D
Dent2
I wrote a nice C# excel routine to automate the formatting of some raw CSV
data. I wrote the
routine on a WinXP computer with Visual Studio .NET 2003 and Office XP
installed. It compiled and ran on my XP machine without problems. Then, I
tried to run the program on a Windows 2000 computer with Office 2000
installed. I got an error:
System.IO.FileNotFoundException: File or assembly name
"Microsoft.Office.Interop.Excel, or one of its dependencies, was not found."
I think that this problem is occurring because the program is compiled on my
XP/Office
10.0 COM-Object system and so it doesn't include all the previous version
objects that are needed to make use of earlier versions of Excel.
My current code employs early-binding of the excel object. I tried to use
late-binding in hopes that this would solve my problem, but I have been
unable to make this work. My trials at late-binding fail durinng
compilation when the Excel.Application() object is created. The compiler
tells me that there is no reference to Excel. My understanding is that, in
late binding, the Excel COM object is created and compiled during the
execution of the program. It shouldn't need a referencing 'using Excel'
statement.
Has anyone in this newsgroup had experience with this problem? Perhaps,
you've dealt with this, or you can refer me to another newsgroup where
someone might be more knowledgable about this issue.
Thank you,
Dennis
data. I wrote the
routine on a WinXP computer with Visual Studio .NET 2003 and Office XP
installed. It compiled and ran on my XP machine without problems. Then, I
tried to run the program on a Windows 2000 computer with Office 2000
installed. I got an error:
System.IO.FileNotFoundException: File or assembly name
"Microsoft.Office.Interop.Excel, or one of its dependencies, was not found."
I think that this problem is occurring because the program is compiled on my
XP/Office
10.0 COM-Object system and so it doesn't include all the previous version
objects that are needed to make use of earlier versions of Excel.
My current code employs early-binding of the excel object. I tried to use
late-binding in hopes that this would solve my problem, but I have been
unable to make this work. My trials at late-binding fail durinng
compilation when the Excel.Application() object is created. The compiler
tells me that there is no reference to Excel. My understanding is that, in
late binding, the Excel COM object is created and compiled during the
execution of the program. It shouldn't need a referencing 'using Excel'
statement.
Has anyone in this newsgroup had experience with this problem? Perhaps,
you've dealt with this, or you can refer me to another newsgroup where
someone might be more knowledgable about this issue.
Thank you,
Dennis