Free Support Forum - aspose.com

Excel Open method error

While opening excel from share point library getting error like "URI formats are not supported"

The following is the code snippet:

Workbook wbook = new Workbook();
wbook.Open("http://webdel28:70/Documents/StaffUpdates4.xls");

This message was posted using Banckle Live Chat 2 Forum

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

I am afraid, you cannot use the Web URL to open your Excel file directly. You will have to first download your file then you will have to open it using one of the 2 following workbook constructors.

1 - Workbook(string filePath)
2 - Workbook(Stream fileStream)

Other constructors are also combination of the above 2 constructors.

I will recommend you to see the following article to find different methods of opening files.

Also, you are using the older version of Aspose.Cells, I recommend you to use the latest version:
Aspose.Cells for .NET (Latest Version) and upgrade your existing application if any. All the bug fixes and newer releases are based on latest versions only.