Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Fri Nov 29, 2019 6:55 am

Code: Select all
var url = "http://***";
WebClient client = new WebClient();
client.Headers.Add("Authorization", "Basic b25kNTFlb2Y6ZW1lNTFseWE=");
client.DownloadFile(url, "D:\\temp.xls");

Workbook wb = new Workbook();
wb.LoadFromFile("D:\\temp.xls");


Error
Unhandled Exception: spr?: This file's format is not supported or you don't specify a correct format.
at spr?.?(String A_0, spr? A_1)
at Spire.Xls.Core.Spreadsheet.XlsWorkbook..ctor(Object A_0, String A_1, ExcelVersion A_2)
at Spire.Xls.Workbook.LoadFromFile(String fileName, ExcelVersion version)
at Spire.Xls.Workbook.LoadFromFile(String fileName)
at ConsoleApp2.Program.Main(String[] args) in C:\Users\*.cs:line 18


I tried used different format ExcelVersion.*
Attachments
temp.zip
(3.29 KiB) Downloaded 186 times

Veliev_Tagir
 
Posts: 1
Joined: Fri Nov 29, 2019 6:36 am

Fri Nov 29, 2019 9:00 am

Hi,

Thanks for your inquiry.
I tried to open your file by MS Excel directly, but there will be the error information. I have attached the screenshot of the error information here, please check it. Kindly note that Spire.XLS follows the rule of MS Excel. If your file could be parsed by MS Excel successfully, then Spire.XLS could operate it as well.
I'm afraid the data in your Excel file is incorrect, please post the file which can be opened correctly by MS Excel to LoadFromFile(). Hope you could understand.

Best wishes,
Amber
E-iceblue support team
Attachments
error.zip
(7.87 KiB) Downloaded 199 times
User avatar

Amber.Gu
 
Posts: 525
Joined: Tue Jun 04, 2019 3:16 am

Return to Spire.XLS