D
Dean Bortell
This code runs fine on win xp and office xp:
string sheetPassword = "Senior1993";
string sheetToOpen = "NewRpt1c.xls";
Excel.Application excelApp = new Excel.Application();
excelApp.Visible=true;
object spreadsheetFileName = Environment.CurrentDirectory
+ "\\" + sheetToOpen;
Excel.Workbook excelWorkbook = excelApp.Workbooks.Open
(Convert.ToString(spreadsheetFileName), 0,false,
Type.Missing, sheetPassword, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing);
Excel.Sheets excelSheets = excelWorkbook.Worksheets;
excelApp.Visible=true;
Application.Exit();
However, on Windows 2000 (.net framework 1.1 installed)
with office 2000 installed it does not work! I need this
to work with office 2000. Am I doing it wrong? Please
give code examples on how to work with excel 2000
workbooks (already exist in the application folder) with
c#. Please Help!!!!
string sheetPassword = "Senior1993";
string sheetToOpen = "NewRpt1c.xls";
Excel.Application excelApp = new Excel.Application();
excelApp.Visible=true;
object spreadsheetFileName = Environment.CurrentDirectory
+ "\\" + sheetToOpen;
Excel.Workbook excelWorkbook = excelApp.Workbooks.Open
(Convert.ToString(spreadsheetFileName), 0,false,
Type.Missing, sheetPassword, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing);
Excel.Sheets excelSheets = excelWorkbook.Worksheets;
excelApp.Visible=true;
Application.Exit();
However, on Windows 2000 (.net framework 1.1 installed)
with office 2000 installed it does not work! I need this
to work with office 2000. Am I doing it wrong? Please
give code examples on how to work with excel 2000
workbooks (already exist in the application folder) with
c#. Please Help!!!!