View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Robert Bruce[_2_] Robert Bruce[_2_] is offline
external usenet poster
 
Posts: 108
Default Compatibility Excel 2002 and 2000 in automation

Michael wrote:
Hello,

I have made a windows application in C#, and i automate Excel to
print some data.

On my dev machine i have Office XP installed (Excel 2002) so i get
the COM dll from it, version 10.0 object library.

The application is running well on machines with Excel 2002, the xls
file open and data is inserted in the cells.

But with Excel 2000 the process fail when opening the workbook.



Is there a way to make it work for both version 2000 and 2002 ?


As Guy says, you could late bind, but I would try developing with your
reference set to the lowest version of Excel you expect your app. to
encounter. I would, however, avoid going down to Excel 97 since I have had
all sorts of issues with automating Office97 from .NET and I believe MS
doesn't recommend it.

Rob