+ Reply to Thread
Results 1 to 3 of 3

Open Workbook With VB .NET

  1. #1
    Registered User
    Join Date
    09-04-2008
    Location
    Madrid, Spain
    Posts
    8

    Open Workbook With VB .NET

    Hi everybody.
    I opened a thread some days ago because I was trying to break all the links a workbook could have with a program developed on VB.NET.
    I received an answer but I couldn't try that yet, because I just can't open any workbook, the error I get says that "The server returned an error".
    I have been looking on different forums, searching the internet, there are different ways to open a file, but it seems impossible to me.

    First of all, I included the reference to Excel...
    "Microsoft Excel 11.0 Object library", I'm working with Office 2003.
    Then, I use this code, for example:

    Please Login or Register  to view this content.
    The error I get says (I'll translate it, but I suppose you'll get it)
    "Exception not controlled type: System.Runtime.InteropServices.COMException on Microsoft.visualbasic.dll
    Additional information: Server launched an exception

    Thanks a lot!!
    Last edited by dominicb; 09-10-2008 at 05:10 PM.

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good evening garfield185
    Quote Originally Posted by garfield185 View Post
    I received an answer but I couldn't try that yet, because I just can't open any workbook, the error I get says that "The server returned an error".
    Next time you post code on this forum please try and remember to add code tags - use the "#" button above the post entry window. I've done it for you on this occasion.

    I usually use this code in VB.Net to open a file along with it's Windows' registered default viewer (in this instance an Excel workbook and Excel) :
    Please Login or Register  to view this content.
    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  3. #3
    Registered User
    Join Date
    09-14-2013
    Location
    dubai
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Open Workbook With VB .NET

    Please Login or Register  to view this content.
    full source .. Open and read excel worksheet from excel

    Steve

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Open XLS files in a new Workbook
    By shaught in forum Excel General
    Replies: 0
    Last Post: 05-21-2008, 09:59 AM
  2. How to tell if a workbook is open
    By suburbanght in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-03-2007, 11:12 AM
  3. Open workbook in a macro letting the user choose the workbook
    By russ8502 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-02-2007, 03:10 PM
  4. how to get data from saved workbook that is also currently open?
    By seron in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-01-2007, 02:23 PM
  5. Open a New Workbook
    By Lvenom in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-27-2007, 02:54 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1