P
psmith
Hi,
I am running excel 2000. with version 9.0 type library.
I cannot see the excel application, althought it appears on the taskbar.
I have tried the following code:
Excel.Application xlApp;
Excel.Workbook ExcelWorkbook;
Excel.Worksheet ExcelWorkSheet;
xlApp = new Excel.ApplicationClass();
ExcelWorkbook = (Excel.Workbook)(xlApp.Workbooks.Add(Type.Missing));
ExcelWorkSheet = (Excel.Worksheet)ExcelWorkbook.Sheets["Sheet1"];
ExcelWorkSheet.Name = "My Sheet";
ExcelWorkSheet.Activate();
xlApp.Visible = true;
xlApp.UserControl = true;
ExcelWorkSheet.Cells[1, 1] = "test sheet";
xlApp.Quit();
Marshal.ReleaseComObject(ExcelWorkSheet);
Marshal.ReleaseComObject(ExcelWorkbook);
Marshal.ReleaseComObject(xlApp);
but it does not make the excel visible.
any help appreciated.
I am running excel 2000. with version 9.0 type library.
I cannot see the excel application, althought it appears on the taskbar.
I have tried the following code:
Excel.Application xlApp;
Excel.Workbook ExcelWorkbook;
Excel.Worksheet ExcelWorkSheet;
xlApp = new Excel.ApplicationClass();
ExcelWorkbook = (Excel.Workbook)(xlApp.Workbooks.Add(Type.Missing));
ExcelWorkSheet = (Excel.Worksheet)ExcelWorkbook.Sheets["Sheet1"];
ExcelWorkSheet.Name = "My Sheet";
ExcelWorkSheet.Activate();
xlApp.Visible = true;
xlApp.UserControl = true;
ExcelWorkSheet.Cells[1, 1] = "test sheet";
xlApp.Quit();
Marshal.ReleaseComObject(ExcelWorkSheet);
Marshal.ReleaseComObject(ExcelWorkbook);
Marshal.ReleaseComObject(xlApp);
but it does not make the excel visible.
any help appreciated.