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.

Tue Aug 03, 2021 9:22 am

Hello everybody,

In my C# code :

Code: Select all
                    workbook.LoadFromFile(_sXlFileName);
                 


I open a 1997/2003 xls workbook and I have an issue : "Invalid string in the file."

I have noticed that I have french accented characters in this workbook.

And when I have removed those accented characters, my code works fine and I can load the workbook.

How can I do to make LoadFromFile accept accented characters ?

Thanks a lot in advance.

Laurent.

laurent_diep
 
Posts: 4
Joined: Tue Aug 03, 2021 9:02 am

Tue Aug 03, 2021 10:38 am

Hello Laurent,

Thanks for your inquiry.
I simulated an Excel 97-2003 file with several accented characters and load it with our Spire.XLS, but I did not reproduce your issue. To help us reproduce your issue and help you solve it, please provide your input file. You could upload it here or send it to us (support@e-iceblue.com) via email. Thanks in advance.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Tue Aug 03, 2021 11:26 am

Hello Bryan,

Thank you for your answer.

In fact, I found what was wrong.

I had a popup message when I was saving my workbook, that informed me about compatibity (because the xls workbook was created from an xlsx workbook).

And I checked an option in this popup message to not be informed anymore, and now the workbook opens well when I run : oWorkbook.LoadFromFile(_sXlFileName);

Sorry for the inconvenience.

Laurent.

laurent_diep
 
Posts: 4
Joined: Tue Aug 03, 2021 9:02 am

Wed Aug 04, 2021 1:14 am

It doesn't matter. And I am glad to hear that your issue has been solved.
If you encounter any issues related to our products in the future, please feel free to contact us.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Return to Spire.XLS