I need help with loading a .xls file into excel from my program. I can start Excel but as soon as I try to open the specified file it throws an exception. Does anyone know how to do this???
Printable View
I need help with loading a .xls file into excel from my program. I can start Excel but as soon as I try to open the specified file it throws an exception. Does anyone know how to do this???
I suspect a bug in .NET's C# when you include Excel's .dll.
It builds you 1-3 .dll files depending on the version of Excel. When you try using them (open a new workbook through your application) an exception is thrown by Excel and the workbook is not loaded. If I run the Excel method "FindFiles" it opens the open dialog and I can find the .xls file and access it through my application.
I'm trying to find a workaround or another way to access the workbook. Any help would be appreciated.
Found it!
Check out the article in this link:
http://support.microsoft.com/default...;en-us;Q302084
It describes how to access data in an excel workbook.
http://support.microsoft.com/default...=kb;NO;q307029
You can find how to open workbooks in Excel (the other article does not describe how to open - just how to create).