Error: URI formats are not supported.

  • Thread starter Thread starter Mel
  • Start date Start date
M

Mel

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

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top