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.

Thu Feb 24, 2022 1:27 am

Hi, I'm using just a couple lines of code to export my XLS to HTML... and it looks terrible. Please see the attached pictures/results.
I figured out it is because of the word wrapping in my merged cells at the bottom.
Any advice?
I don't mind altering the formatting in my XLS... but I need a large word-wrap paragraph at the bottom of my XLS.

Thanks!
Sam

Dim oWorkbook As New Workbook
oWorkbook.LoadFromFile("C:\temp\test.xlsx",)
Dim oOption As New Core.Spreadsheet.HTMLOptions
oOption.StyleDefine = Core.Spreadsheet.HTMLOptions.StyleDefineType.Head
oOption.ImageEmbedded = True
oOption.TextMode = Core.Spreadsheet.HTMLOptions.GetText.Value
oWorkbook.Worksheets(0).SaveToHtml("C:\temp\test.htm", oOption)

Excel.png
Excel.png (76.21 KiB) Viewed 709 times


Results.png
Results.png (87.16 KiB) Viewed 709 times
Attachments
Temp.zip
Excel file and results
(1.35 KiB) Downloaded 384 times

spire_sphillips
 
Posts: 10
Joined: Tue Feb 01, 2022 10:59 pm

Thu Feb 24, 2022 6:22 am

Hello,

Thanks for your inquiry!

I simulated a XLS file, and converted it to HTML with the latest Spire.Xls for net version 12.1, but did not reproduce your issue, the text is wrapped well.

If you are not using the latest version, I just recommend that you can try it first. If the issue still exists, please provide us with your input XLS file, your system information (E.g. Win7, 64 bit) and region setting (E.g. China, Chinese) for further investigate. Thanks in advance.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Thu Feb 24, 2022 3:24 pm

Yes, I'm using the 12.1 version. The input XLS is in the attached file here (temp.zip).

My development system is Windows 11 Enterprise, 10.0.22000 Build 22000, and the same symptoms appear on my production server which is Windows Server 2019 Data Center, 10.0.17763 Build 17763.

My Region is United States, and language is English [United States].

Thank you!
Sam
Attachments
Temp.zip
Test files
(1.35 KiB) Downloaded 390 times

spire_sphillips
 
Posts: 10
Joined: Tue Feb 01, 2022 10:59 pm

Fri Feb 25, 2022 6:24 am

Hello,

Thanks for your feedback!

Sorry that there is only a "test.htm" file in your attached file, please upload your input "test.xlsx" file to us, you can also send it to us via email (support@e-iceblue.com).

I also tested in the Win11 and Win server 2019, but the text is still wrapped well. I am afraid that the file you were using is the key point of the issue, and I will test again as soon as we receive your file. Thanks in advance.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Fri Feb 25, 2022 3:11 pm

Duh, sorry.. I was certain it was in there... and didn't double-check.
Please find a correct.zip file here with the input/results.

Thanks,

Sam
Attachments
corrected.zip
(13.5 KiB) Downloaded 387 times

spire_sphillips
 
Posts: 10
Joined: Tue Feb 01, 2022 10:59 pm

Mon Feb 28, 2022 1:56 am

Hello,

Thanks for sharing your files!

I have reproduced your issue and logged it in our issue tracking system with the ticket SPIREXLS-3709 for further investigation.

We will let you know if there is any update. Sorry for the inconvenience caused.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Mon Feb 28, 2022 2:38 pm

Thanks Marcia, I appreciate the update. I am working around the issue by merging cells and using word-wrap... but would greatly welcome a permanent fix. Thank you!

Sam

spire_sphillips
 
Posts: 10
Joined: Tue Feb 01, 2022 10:59 pm

Tue Mar 01, 2022 1:52 am

Hello Sam,

You are welcome.

Glad to hear that you found a method to solve this issue. And once the issue has any good news, we will notify you immediately. Sorry for the inconvenience caused.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Fri Apr 15, 2022 9:52 am

Hello,

Thanks for your patience.
Glad to inform you that we just released Spire.XLS Pack(Hotfix) Version:12.4.1, which fixes the issue of SPIREXLS-3709. Please download the new version from the following links for testing.

Website link: https://www.e-iceblue.com/Download/download-excel-for-net-now.html
NuGet link: https://www.nuget.org/packages/Spire.XLS/12.4.1

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Fri Apr 15, 2022 2:02 pm

Awesome, I won't be able to test for a few days, but thank you!!!

spire_sphillips
 
Posts: 10
Joined: Tue Feb 01, 2022 10:59 pm

Mon Apr 18, 2022 1:21 am

Hello,

You're welcome.
Looking forward to your test feedback.
Have a nice day!

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Return to Spire.XLS