How do I use Microsoft.Office.Interop.Excel.dll in a console app that could run on any machine
If you only need to open and write to excel files, use any public source libraries for working with xls / xlsx files and do not use Microsoft.Office.Interop.Excel.dll at all.
See Reading Excel files from C# or http://koogra.sourceforge.net/.
Jai
Check out my first Android app on Google Play store - Veg Finder I hope it serves you well!
Updated on June 07, 2022Comments
-
Jai almost 2 years
In visual Studio 2010 Console application, I added a reference to Microsoft.Office.Interop.Excel.dll from C:\Program Files (x86)\Microsoft Visual Studio 10.0\Visual Studio Tools for Office\PIA\Office14\Microsoft.Office.Interop.Excel.dll and my program to open and write into an excel file works fine. But when I run this .exe on another machine that doesn't have Microsoft Office or visual studio, it throws.
One option is to install PIA on the machines I want my program to run but I want it to be self contained. What is the best way?
-
Jai over 12 yearsuse any public source libraries - I am unclear on that, Can you please give an example?