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.

Wed Feb 28, 2018 1:48 am

We have software (Tekla) which creates report spreadsheets. When opened in Excel these give an error message "The format and extension of <filename> don't match. The file could be corrupted or unsafe. Unless you trust the source, don't open it. Do you want to open it anyway?".
If I click "Yes" it opens fine.
However in a c# application the line:-
workbook.LoadFromFile(currentfile);
gives an error.

Is there any way to simulate the "Yes" response when using workbook.LoadFrom?

ormond
 
Posts: 2
Joined: Mon Jan 08, 2018 10:00 am

Wed Feb 28, 2018 6:48 am

Hello,

Thanks for your inquiry.
Firstly, i suggest using our latest Spire.XLS Pack Version:8.0 to have a test, if the issue still happens, please send your sample excel file which can replicate your issue to us, we will investigate whether the issue can be resolved.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1182
Joined: Tue Sep 27, 2016 1:06 am

Fri Mar 02, 2018 10:03 pm

Hi Nina

I thought I had replied to this but don't see it posted. At the risk of duplication I will try again.

The later version of the .dll gave the same problem.

Attached is a copy of an example of the file giving the problems. As I said, created by CAD software called Tekla.

Ormond
Attachments
1-Excel SP Material List.zip
(3.57 KiB) Downloaded 235 times

ormond
 
Posts: 2
Joined: Mon Jan 08, 2018 10:00 am

Mon Mar 05, 2018 3:26 am

Hello,

Thanks for your sharing.
After an investigation, I found that your excel file actually is a html file. I am sorry our Spire.Xls doesn't support loading html files. If you have other questions related to our products, welcome to contact us.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1182
Joined: Tue Sep 27, 2016 1:06 am

Return to Spire.XLS