EDN Admin
Well-known member
I have inherited maintenance of a project written by a colleague in C# which interfaces with Excel. I have done a lot of programming with Excel over the years, mostly with VB6 and VBA, but I dont have any experience using office interop in .Net, and I would
like some pointers for where to start looking for a solution to my problem.
The problem is that everything works fine with Excel 2007 and 2010, but no Excel file is produced when the user has Excel 2003 (it also needs to be compatible with 2002, and if possible also 2000). I dont get any error message, it just doesnt produce the
file. I havent had a good in depth look at the code yet, but it seems to be referencing Microsoft.Office.Interop.Excel version 14.0.0.0. I am guessing that I need to alter this to reference an older version. Is that right?
When I used to program for Excel in VB6 I always used to use late binding to avoid this sort of problem. Might that approach work here too? i.e. just remove the Excel reference and declare all the variables as Object.
My development machine has Excel 2007 and I am using Visual Studio 2010. I have access to an old laptop which has Excel 2003 on it, so Im going to try installing C# express on here, and see if I can do some debugging with that. I can probably also find
an old Office XP disk somewhere if I need to install this.
Any suggestions where to start would be appreciated.
Thanks,<br/>
Phil.
<br/>
View the full article
like some pointers for where to start looking for a solution to my problem.
The problem is that everything works fine with Excel 2007 and 2010, but no Excel file is produced when the user has Excel 2003 (it also needs to be compatible with 2002, and if possible also 2000). I dont get any error message, it just doesnt produce the
file. I havent had a good in depth look at the code yet, but it seems to be referencing Microsoft.Office.Interop.Excel version 14.0.0.0. I am guessing that I need to alter this to reference an older version. Is that right?
When I used to program for Excel in VB6 I always used to use late binding to avoid this sort of problem. Might that approach work here too? i.e. just remove the Excel reference and declare all the variables as Object.
My development machine has Excel 2007 and I am using Visual Studio 2010. I have access to an old laptop which has Excel 2003 on it, so Im going to try installing C# express on here, and see if I can do some debugging with that. I can probably also find
an old Office XP disk somewhere if I need to install this.
Any suggestions where to start would be appreciated.
Thanks,<br/>
Phil.
<br/>
View the full article