Aspose setHtmlString() not rendering HTML to Excel export

Additionally, I found below styles not getting exported using setHtmlString()?

a) Line breaks using

tag are not working
eg: cell.setHtmlString(“

First Line

Next Line

”);

b) Bullets(.) unordered list are not working
eg: cell.setHtmlString(“

  • First Bullet
  • Second Bullet
”);

c) Italics using tag are not working
eg: cell.setHtmlString(“

Italics

”);

d) Font family styles are not working
eg: cell.setHtmlString(“

Arial Black

”);

e) Paragraph break is not working
eg: cell.setHtmlString(“

First Para


Second Para


Third Para

”);

Requesting you to update us ASAP.

@ameykhanolkar,

Thanks for the details and snippets.

After an initial test, I am able to reproduce the issue(s) as you mentioned by using the following sample code. Except for bullets and numberings (ordered/unordered list), Ms Excel does render other HTML tags ok. So, we got to look into all the issues except bulletted lists:
e.g
Sample code:

Workbook workbook = new Workbook();
        Cell cell = workbook.getWorksheets().get(0).getCells().get("A1");
        cell.setHtmlString("<td height=17 class=xl66 width=64 style='height:12.75pt;width:48pt'><a href=\"http://google.com\" target=\"_parent\">google</a></td>");

        cell = workbook.getWorksheets().get(0).getCells().get("A3");
        cell.setHtmlString("<p>First Line</p><p>Next Line</p>");

        cell = workbook.getWorksheets().get(0).getCells().get("A6");
        cell.setHtmlString("<ul><li>First Bullet</li><li>Second Bullet</li></ul>");

        cell = workbook.getWorksheets().get(0).getCells().get("A9");
        cell.setHtmlString("<p><em>Italics</em></p>");

        cell = workbook.getWorksheets().get(0).getCells().get("A12");
        cell.setHtmlString("<p style='margin:0cm;margin-bottom:.0001pt;font-size:16px;font-family:Cambria;'><span style='font-family:&quot;Arial Black&quot;'>Arial Black</span></p>");

        cell = workbook.getWorksheets().get(0).getCells().get("A15");
        cell.setHtmlString("<p style='margin:0cm;margin-bottom:.0001pt;font-size:16px;font-family:Cambria;'>First Para</p><p style='margin:0cm;margin-bottom:.0001pt;font-size:16px;font-family:Cambria;'><br></p><p style='margin:0cm;margin-bottom:.0001pt;font-size:16px;font-family:Cambria;'>Second Para</p><p style='margin:0cm;margin-bottom:.0001pt;font-size:16px;font-family:Cambria;'><br></p><p style='margin:0cm;margin-bottom:.0001pt;font-size:16px;font-family:Cambria;'>Third Para</p>");

        workbook.save("f:\\files\\out1.xlsx");

I have logged a ticket with an id “CELLSJAVA-43039” for your issue. We will look into it soon.

Once we have an update on it, we will let you know.

@ameykhanolkar,

This is to inform you that we have fixed your issue (logged earlier as “CELLSJAVA-43039”) now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.

@ameykhanolkar,

Please try our latest version/fix: Aspose.Cells for Java v19.10.3(attached)

Your issue should be fixed in it.

Let us know your feedback.
Aspose_Cells_Java_v19.10.3.zip (6.6 MB)

The issues you have found earlier (filed as CELLSJAVA-43039) have been fixed in Aspose.Cells for Java v19.11. This message was posted using Bugs notification tool by ahsaniqbalsidiqui