Click to See Complete Forum and Search --> : Opening files in Excel from my app?


xtsea
December 23rd, 2001, 02:21 PM
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???

Innocent
January 2nd, 2002, 06:02 AM
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.

Innocent
January 2nd, 2002, 09:58 AM
Found it!

Check out the article in this link:

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q302084
It describes how to access data in an excel workbook.

http://support.microsoft.com/default.aspx?scid=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).