HtmlString Bugged

I currently updatet to Aspose.Cells (v4.0.30319).

Since then the .HtmlString is not working properly.

Example:
string x= Workbook.Worksheet[0].Cells[0,0].HtmlString;
Before the update the htmlstring Content was absolutly right. Espcialy whenn there was a bold part in the string.
This is a Text Bold. = the right html tags in the string.
now this line is just wrong, there are 2 outcomes.
First the strong is not recognized OR the whole text will be made with a strong tag.

Best Regards

@rlruta,
I have tried the following sample code but could not observe any issue with the latest version. Please give it a try and share the feedback. If the issue is not resolved, please share your environment details with us for our reference. We will try to reproduce the issue and share our feedback accordingly.

Workbook wb = new Workbook();
Worksheet ws = wb.Worksheets[0];
var cell = ws.Cells[1, 1];
cell.HtmlString = "<html><body><p>This text is normal.</p><p><b>This text is bold.</b></p></body></html>";
wb.Save("output.xlsx");

Here is the output file:
output.xlsx.zip (6.4 KB)

Please try the latest fix 21.9.5.
Aspose.Cells21.9.5 For .Net2_AuthenticodeSigned.Zip (5.6 MB)
Aspose.Cells21.9.5 For .Net4.0.Zip (5.6 MB)
Aspose.Cells21.9.5 For .NetStandard20.Zip (5.6 MB)

I ment the other way from excel to htmlstring
Line of code:
string tmp = input.Worksheets[i].Cells[x, y].HtmlString;

I can reproduce this error infinit times.

Maybe this helps to state my Problem properly.

so i have this line of code:
string tmp = input.Worksheets[i].Cells[(zeile + 1), spalten[3]].HtmlString;

im using the exact same excel on both my Program Versions. (Old vs New)
In the Excel Cell is following Content:
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
here is the output from the codeline above.
Old Aspose:
“<Font Style=“FONT-WEIGHT: bold;FONT-FAMILY: Arial;FONT-SIZE: 10pt;COLOR: #000000;”>Lorem Ipsum<Font Style=“FONT-FAMILY: Arial;FONT-SIZE: 10pt;COLOR: #000000;”> is simply dummy text of the printing and typesetting industry.”
New Aspose:
“<Font Style=“FONT-WEIGHT: bold;FONT-FAMILY: Arial;FONT-SIZE: 10pt;COLOR: #000000;”>Lorem Ipsum is simply dummy text of the printing and typesetting industry.”

So u see the New one is wrong. Hope this helps

@rlruta,

I could not find the issue. Aspose.Cells follows MS Excel standards and specifications when parsing or rendering HTMLs. I did test using the following sample code, it works fine:
e.g.
Sample code:

Workbook wb = new Workbook();
            Worksheet ws = wb.Worksheets[0];
            var cell = ws.Cells[1, 1];
            cell.HtmlString = "<html><body><p>This text is normal.<b>This text is bold.</b></p></body></html>";
            wb.Save("e:\\test2\\output.xlsx");

            Workbook workbook = new Workbook("e:\\test2\\output.xlsx");
            string tmp = workbook.Worksheets[0].Cells[1, 1].HtmlString;
            Console.WriteLine(tmp);

output:
<Font Style="FONT-FAMILY: Arial;FONT-SIZE: 10pt;COLOR: #000000;">This text is normal.</Font><Font Style="FONT-WEIGHT: bold;FONT-FAMILY: Arial;FONT-SIZE: 10pt;COLOR: #000000;">This text is bold.</Font>

It looks the above output is ok. Even then, I pasted the above html output string by creating a file and save it as “.html”. It works fine when I opened the HTML file into the browser, it shows correct output too.

Could you share your Excel file and sample code (runnable) to show the issue, we will check it soon.

PS. please zip the Excel file prior attaching here.