M
Michael Sanford
I'm getting a Sysmte.IO.FileNotFoundException when executing the code
below.
It is straight from the example. This works on one machine, but not
the other. Other benign calls invoke the same misbehavior which as
ActiveWorkbook or Active Worksheet.
Please help!
peace,
- mike
Excel.Application app = new Excel.Application();
if (app == null) {
Console.WriteLine("ERROR: EXCEL couldn't be started!");
return false;
}
Console.WriteLine ("Making application visible");
app.Visible = true;
Console.WriteLine ("Getting the workbooks collection");
Workbooks workbooks = app.Workbooks;
Console.WriteLine ("Adding a new workbook");
try {
_Workbook workbook = workbooks.Add(XlWBATemplate.xlWBATWorksheet);
} catch (System.IO.FileNotFoundException) {
Console.WriteLine("Always gets here.");
}
....
below.
It is straight from the example. This works on one machine, but not
the other. Other benign calls invoke the same misbehavior which as
ActiveWorkbook or Active Worksheet.
Please help!
peace,
- mike
Excel.Application app = new Excel.Application();
if (app == null) {
Console.WriteLine("ERROR: EXCEL couldn't be started!");
return false;
}
Console.WriteLine ("Making application visible");
app.Visible = true;
Console.WriteLine ("Getting the workbooks collection");
Workbooks workbooks = app.Workbooks;
Console.WriteLine ("Adding a new workbook");
try {
_Workbook workbook = workbooks.Add(XlWBATemplate.xlWBATWorksheet);
} catch (System.IO.FileNotFoundException) {
Console.WriteLine("Always gets here.");
}
....