Lost text formatting when converting from HTML to Excel

Hi,

When converting from HTML to Excel, we noticed the cell formatting lost issue, also some text lost.
Please find the file in the attached zip.
NewFolder.zip (16.9 KB)
Thanks advance for your help.

@FSUPTC,

I did test your scenario/case using the following sample code with your input HTML file. I did not find any significant issue regarding formatting or data lost. Please note, you should first open the HTML file into MS Excel manually and then compare it with the resultant Excel file (by Aspose.Cells). If you still find some issues, kindly do share screenshots to highlight the problematic areas, so we could evaluate your mentioned issues on our end.
e.g.
Sample code:

byte [] temp = Files.readAllBytes(Paths.get("f:\\files\\Original.html"));
IputStream inputStream = new ByteArrayInputStream(temp);
HtmlLoadOptions loadOptions = new HtmlLoadOptions(LoadFormat.HTML);
loadOptions.setAutoFitColsAndRows(true);
Workbook convertedDocument = new Workbook(inputStream, loadOptions);
convertedDocument.save("f:\\files\\out1.xlsx", SaveFormat.XLSX);
inputStream.close();

Even with your proposition, the text lost is still happened.
Snag_1f94b1c3.png (35.2 KB)

About the formatting issue, based on your comment, that means what i see in HTML side, it might be not always the same as the result, i should check by open the html file first in Excel to make sure how it looks like?

@FSUPTC,

Thanks for the screenshot.

I am able to reproduce the issue as you mentioned by converting your HTML document to Excel XLSX file format. I found some data/formatting lost in HTML to Excel conversion. I have logged a ticket with an id “CELLSJAVA-44997” for your issue. We will look into it soon.

Yes, generally, Aspose.Cells follows Ms Excel standards and specifications when parsing/rendering HTMLs. So, what is shown/rendered in/by MS Excel, Aspose.Cells should mimic it.

@FSUPTC,

This is to inform you that your issue has been resolved now. The fix will be included in our upcoming release (Aspose.Cells v22.12) which is scheduled in the first half of December 2022. You will be notified once the next release is published.

The issues you have found earlier (filed as CELLSJAVA-44997) have been fixed in this update. This message was posted using Bugs notification tool by Peyton.Xu

Hi,

We tested your latest version(23.2) aspose.cells, the issue is remained.

  1. the test seems not lost this time, but the formatting is still lost.

@FSUPTC,

I did test your scenario/case again with latest version/fix. I found the second bullet in “Test step” column has strikethrough formatting which you think it should not be there. But, please open your input HTML file into some browser type (e.g., Google chrome, IE, etc.) and check the display in it, you will also find those strikethrough formattings for the bullet. If you still find any issue/differences regarding formatting while comparing input HTML (in browser) vs. output Excel file by Aspose.Cells (in MS Excel), kindly provide a screenshot to highlight all the formatting issues, so we could evaluate in details.

Hi,
Please check the screenshot in the attachment.

The strikethrough line should be cover all the text in that cell, and also the color is not applied for all cell too.

Doc_Export_1677158865111.zip (13.4 KB)
Snag_23601c9f.png (40.4 KB)

Snag_2360bd15.png (17.1 KB)

@FSUPTC,

You are right, there are still some formatting issues as we tested using your newly HTML file. I found some formatting issues are there (in HTML to Excel rendering) as you demonstrated via screenshots.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSJAVA-45197

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@FSUPTC,

This is to inform you that your issue (logged earlier as “CELLSJAVA-45197”) has been resolved. The fix will be included in our upcoming release (Aspose.Cells v23.3) that we plan to release in the first half of March 2023. You will be notified when the next version is released.

The issues you have found earlier (filed as CELLSJAVA-45197) have been fixed in Aspose.Cells for Java 23.3.