I'm getting a Sysmte.IO.FileN otFoundExceptio n 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.Applicati on app = new Excel.Applicati on();
if (app == null) {
Console.WriteLi ne("ERROR: EXCEL couldn't be started!");
return false;
}
Console.WriteLi ne ("Making application visible");
app.Visible = true;
Console.WriteLi ne ("Getting the workbooks collection");
Workbooks workbooks = app.Workbooks;
Console.WriteLi ne ("Adding a new workbook");
try {
_Workbook workbook = workbooks.Add(X lWBATemplate.xl WBATWorksheet);
} catch (System.IO.File NotFoundExcepti on) {
Console.WriteLi ne("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.Applicati on app = new Excel.Applicati on();
if (app == null) {
Console.WriteLi ne("ERROR: EXCEL couldn't be started!");
return false;
}
Console.WriteLi ne ("Making application visible");
app.Visible = true;
Console.WriteLi ne ("Getting the workbooks collection");
Workbooks workbooks = app.Workbooks;
Console.WriteLi ne ("Adding a new workbook");
try {
_Workbook workbook = workbooks.Add(X lWBATemplate.xl WBATWorksheet);
} catch (System.IO.File NotFoundExcepti on) {
Console.WriteLi ne("Always gets here.");
}
....
Comment