Hi there,
How can I open an excel file from c# so that the application actually opens on screen?
The below code opens the file but it doesnt open onscreen - what am i missing?
Thanks
JB
string
filePath = (Environment.CurrentDirectory + @"\xlsx\Book2.xlsm");Microsoft.Office.Interop.Excel.
ApplicationClass excelApp = new Microsoft.Office.Interop.Excel.ApplicationClass(); // Microsoft.Office.Interop.Excel.Workbook workBook = excelApp.Workbooks.Open(filePath, 0, // true, 5, "", "", true, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, // "\t", false, false, 0, true, 1, 0); Workbook workBook = excelApp.Workbooks.Open(filePath, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
Muhammad Shahid Farooq107 reputationPosted Aug 11, 2008, 12:25 PM EDT
Microsoft.Office.Interop.Excel.Workbook workbook = _excel.Workbooks.Add(Type.Missing);
Microsoft.Office.Interop.Excel.Worksheet ws = (Microsoft.Office.Interop.Excel.Worksheet)_excel.ActiveSheet;
ws.Activate();
jack burton3 reputationPosted Aug 11, 2008, 1:09 PM EDT