var excel = new ActiveXObject ("Excel.Application");
excel.Visible=true;
book = excel.Workbooks;
// book.Open("D:\\1\\1.xls ", 2, true, null, null, null, false, null, null, false, false, null, null, null, null);
book.Open("D:\\1\\1.xls", false, true);
sheet=excel.Sheets(1);
sheet.Select();
var value = sheet.Range ("A1");
excel.Application.DisplayAlerts = false;
book.Close();
excel.Application.DisplayAlerts=true;
excel.Application.Quit();
X.WARNING (value);
and it throws the same error when it gets to book.Close(); part.... ( Could not convert variant of type (Dispatch) into type (OleStr) )