Spire.XLS for .NET is a professional Excel .NET library that can be used to any type of .NET( C#, VB.NET, ASP.NET, .NET Core) application and Java (J2SE and J2EE) application.

Fri Jan 11, 2019 11:02 pm

I am trying to convert a .xls file to .xlsx but all of the formatting is lost during the conversion. Here is the code:

Code: Select all
Spire.Xls.Workbook workbook = new Spire.Xls.Workbook();
workbook.SaveToFile(filePathName, ExcelVersion.Version2013);

It doesn't matter which ExcelVersion I choose. This is how the conversion looks:
screenshot.png (24.99 KiB) Viewed 464 times

The data is coming from a 3rd party database so that is why the code sample has the data loaded as a stream. It doesn't matter if I export to a file first, the same thing happens. Attached is the raw file from the database.

The 3rd party application hides the workbook so you have to click the View menu in Excel and click Unhide to view the data. The conversion automatically unhides the data which is perfectly fine.

Any help would be appreciated.
(8.29 KiB) Downloaded 59 times

Posts: 2
Joined: Fri Jan 11, 2019 10:20 pm

Mon Jan 14, 2019 2:37 am


Thank you for your inquiry.
I have reproduced the issue and logged it in our bug tracking system. Once it is fixed, I will let you know.
Sorry for the inconvenience caused!

E-iceblue support team
User avatar

Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Sun Jan 20, 2019 5:16 pm

Thank you. I'll be interested if this can be fixed.

Posts: 2
Joined: Fri Jan 11, 2019 10:20 pm

Mon Jan 21, 2019 1:55 am


Sorry that the issue is not resolved at present. And I got information from our Dev team that the issue is very complex and it would not be fixed in a short time. Anyway, we will inform you as soon as there is any good news.

E-iceblue support team
User avatar

Posts: 3067
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.XLS