Bug - Adding HTML Rich Text in Excel using Aspose.Cells: Font size reduced to 1 for multiple bullet points

For a given worksheet of type Aspose.Cells.Worksheet , the value of cell can not parse HTML enrich text properly. The font of the text in the nested bullet points is reduced to 1, when opening the excel file. Bullet points and indentation are displayed correctly after the new update but the font size of the text is mixed up.

I am using Aspose.Cells v24.3 and have tested the versions > v24.3 as well. But the problem still exists.

Approach:

string value = "<b>Example Test</b>
<div>
    <ul>
        <li>Example 1
            <ul>
                <li><span style="font-size:1.16rem;text-transform:inherit">Example 1.1 </span>
                    <ul>
                        <li><span style="font-size:1.16rem;text-transform:inherit">Example 1.1.1</span> </li>
                    </ul>
                </li>
            </ul>
        </li>
        <li>Example 2
            <ul>
                <li>Example 2.1 </li>
                <li>Example 2.2</li>
            </ul>
        </li>
    </ul>
</div>";
worksheet.Cells[1,1].HtmlString =  value; 

Excel Sheet Output:
Excel_Screenshot.png (14.9 KB)

Expected Output:

Example Test

  • Example 1
    • Example 1.1
      • Example 1.1.1
  • Example 2
    • Example 2.1
    • Example 2.2

@riteshshrestha,

Thanks for the details.

After an initial testing, I was able to reproduce the issue you mentioned. I found font size reduced to 1 for multiple bullet points when adding HTML rich text to worksheet cell. The font of the text in the nested bullet points is reduced to 1, when opening the output Excel file.

Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];

string value = "<b>Example Test</b><div><ul><li>Example 1<ul><li><span style=\"font-size:1.16rem;text-transform:inherit\">Example 1.1 </span> <ul><li><span style=\"font-size:1.16rem;text-transform:inherit\">Example 1.1.1</span> </li></ul></li></ul></li><li>Example 2<ul><li>Example 2.1 </li><li>Example 2.2</li></ul></li></ul></div>";
worksheet.Cells[1,1].HtmlString =  value;

workbook.Save("e:\\test2\\out1.xlsx");

We require thorough evaluation of the issue. 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): CELLSNET-56181

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.

1 Like

@iticertis ,

We are pleased to inform you that your issue has been resolved. The fix will be included in an upcoming release (Aspose.Cells v24.8 that we plan to release in the first half of August 2024. You will be notified when the next version is released.
Attached is the fixed result for your reference:
output.zip (6.1 KB)