C# app that uses Excel Interop, easy switch between 2003 2007?

Posted by user320781 on Stack Overflow See other posts from Stack Overflow or by user320781
Published on 2010-05-27T22:19:45Z Indexed on 2010/05/27 22:21 UTC
Read the original article Hit count: 194

Filed under:
|
|
|
|

I have an app written that just does really basic I/O on a spreadsheet. Read in a bunch of cells, do some sorting, and dump the output back into another spreadsheet. Works great on my machine. I have Office 2003 installed.

When it runs on someone elses machine with 2007, it bombs, presumably due to the different versions of the Interop assemblies.

I was hoping someone knew a way to dynamically change which/where the assembly is loaded from depending on the office version (getting the office version is easy from the registry).

Sifting thru the rest of the internet, i didnt see anything to indicate that was possible :( . I tried installing the 2007 PIAs, but when i try to add a reference, they dont show up and i have no idea where to browse for them (they arent in the c:\windows\assemblies\; maybe the install didnt work). Am I going to have to get a machine with 2007 installed to build on every time i need to make updates?

© Stack Overflow or respective owner

Related posts about c#

Related posts about excel