Assembly Error Wth Excel 2003

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi everyone

I have a program written on C# that works with Microsoft Excel application. I built it to work with Excel 2000. With runtime objects I created assemblies to connect to Excel. Everything worked properly since I was installed the new version on Microsoft Office 2003
Of cause, I rebuild assemblies and tried to connect. I got an error on Excel execution. When I opened source code to fix it, I found that there are no Workbooks and Worksheets collections any more. The Dot Net exported them as METHODS with one argument – index.
Therefore I cannot to make my program work

What I am doing wrong?

I executed Excel 2003 application with next command

Excel._ExcelApplication oApplication = new Excel._ExcelApplicationClass();

Then I tried to get Workbooks collection

Excel.Workbooks oWorkbooks = Parent.ExcelApplication.Workbooks

This syntax works for assembly created for Excel 2000, but returns compilation error with assembly created for Excel 2003

Please help me with this problem

Best regards
Igor
 
Igor

I am not familiar with automation using C#. I would suggest you as this
question either in Excel.Programming or one of the .Net newsgroups as it
seems more an operability issue than a crash

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)


Igor said:
Hi everyone!

I have a program written on C# that works with Microsoft Excel
application. I built it to work with Excel 2000. With runtime objects I
created assemblies to connect to Excel. Everything worked properly since I
was installed the new version on Microsoft Office 2003.
Of cause, I rebuild assemblies and tried to connect. I got an error on
Excel execution. When I opened source code to fix it, I found that there are
no Workbooks and Worksheets collections any more. The Dot Net exported them
as METHODS with one argument - index.
Therefore I cannot to make my program work.

What I am doing wrong?

I executed Excel 2003 application with next command:

Excel._ExcelApplication oApplication = new Excel._ExcelApplicationClass();

Then I tried to get Workbooks collection:

Excel.Workbooks oWorkbooks = Parent.ExcelApplication.Workbooks;

This syntax works for assembly created for Excel 2000, but returns
compilation error with assembly created for Excel 2003.
 
Back
Top