Office2003 PIA Problem

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
 
P

Peter Huang

Hi

I reviewed the thread and find that there is a similar issue in the
newsgroup below.Now I have replied to you, you may go and take a look.
Subject: Office 2003 PIA Problems
Newsgroups: microsoft.public.office.developer.automation


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top