CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2001
    Posts
    1

    Opening files in Excel from my app?

    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???


  2. #2
    Join Date
    Aug 2001
    Location
    Norway
    Posts
    115

    Re: Opening files in Excel from my app?

    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.


  3. #3
    Join Date
    Aug 2001
    Location
    Norway
    Posts
    115

    Re: Opening files in Excel from my app?

    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).


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured