D
Diego
Hello,
I'm using VS.NET2003 with Office 2003 PIA installed to automate MS Excel.
When I run the following class
using System;
using Excel = Microsoft.Office.Interop.Excel;
using System.Reflection;
namespace StatisticReader
{
public class ExcelExporter
{
private Excel.Application app;
private Excel.Workbook wb;
public ExcelExporter(string textStats)
{
app = new Excel.ApplicationClass();
app.Visible = true;
wb = app.Workbooks.Add(Excel.XlWBATemplate.xlWBATWorksheet);
}
}
}
I get this error:
An unhandled exception of type 'System.Runtime.InteropServices.COMException'
occurred in StatisticReader.exe
Additional information: Old format or invalid type library.
I checked the reference properties and it point to the actual PIA :
Microsoft.Office.Interop.Excel.dll in the GAC. I checked the code against
MSDN samples and I installed again MS Office just to be sure.
Do you know why I get that error? How can I solve it?
Thank you
Diego
I'm using VS.NET2003 with Office 2003 PIA installed to automate MS Excel.
When I run the following class
using System;
using Excel = Microsoft.Office.Interop.Excel;
using System.Reflection;
namespace StatisticReader
{
public class ExcelExporter
{
private Excel.Application app;
private Excel.Workbook wb;
public ExcelExporter(string textStats)
{
app = new Excel.ApplicationClass();
app.Visible = true;
wb = app.Workbooks.Add(Excel.XlWBATemplate.xlWBATWorksheet);
}
}
}
I get this error:
An unhandled exception of type 'System.Runtime.InteropServices.COMException'
occurred in StatisticReader.exe
Additional information: Old format or invalid type library.
I checked the reference properties and it point to the actual PIA :
Microsoft.Office.Interop.Excel.dll in the GAC. I checked the code against
MSDN samples and I installed again MS Office just to be sure.
Do you know why I get that error? How can I solve it?
Thank you
Diego