Error: URI formats are not supported.

Discussion in 'ASP .Net' started by Mel, Aug 20, 2007.

  1. Mel

    Mel Guest

    I am getting this error when I try to declare an object as an Excel
    workbook. Can anyone tell me how to fix it? I have placed the Excel
    file on the server in the "spreadsheets" directory.

    Public Shared wkbExcel As SpreadsheetGear.IWorkbook
    =SpreadsheetGear.Factory.GetWorkbook("http:\\myport.mydomain.com
    \spreadsheets\span tables.xls")
     
    Mel, Aug 20, 2007
    #1
    1. Advertising

  2. Mel

    Guest

    The error you are getting ("URI formats are not supported") means that
    you cannot pass a URL to the function. Instead, you will have to pass
    a local path to the file e.g.

    Public Shared wkbExcel As SpreadsheetGear.IWorkbook =
    SpreadsheetGear.Factory.GetWorkbook("c:\myfile.xls")

    Mark,
    http://aspnetlibrary.com
     
    , Aug 20, 2007
    #2
    1. Advertising

  3. Mel

    Mel Guest

    On Aug 20, 8:17 am, ""
    <> wrote:
    > The error you are getting ("URI formats are not supported") means that
    > you cannot pass a URL to the function. Instead, you will have to pass
    > a local path to the file e.g.
    >
    > Public Shared wkbExcel As SpreadsheetGear.IWorkbook =
    > SpreadsheetGear.Factory.GetWorkbook("c:\myfile.xls")
    >
    > Mark,http://aspnetlibrary.com


    Thanks for your help! It works great now.

    Public Shared wkbExcel As SpreadsheetGear.IWorkbook =
    SpreadsheetGear.Factory.GetWorkbook("Q:\portal\spreadsheets\Span
    Tables.xls")
     
    Mel, Aug 20, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Simon Harris
    Replies:
    0
    Views:
    6,489
    Simon Harris
    May 10, 2005
  2. VB Programmer

    Error: URI formats are not supported

    VB Programmer, May 14, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    36,322
    dirkasaurus-rex
    Oct 11, 2006
  3. Stanimir Stamenkov
    Replies:
    1
    Views:
    2,538
    Stanimir Stamenkov
    Aug 17, 2005
  4. Pavel
    Replies:
    2
    Views:
    1,733
    Peter Flynn
    Aug 4, 2004
  5. etheriau
    Replies:
    1
    Views:
    704
    Pavel
    Aug 23, 2004
Loading...

Share This Page