Newinjava
Newinjava

Reputation: 960

Not able to apply mso-number-format in HTML for HTML string to Excel conversion using Aspose Cells

I am trying to convert Html string to Excel using Aspose Cells. I am trying to convert negative number to number with parenthesis and comma and the number to be aligned in such a way that the decimal point comes in single line as shown in the below image.

enter image description here

For the html string, I am creating a table in jquery where I am inserting mso-number-format in the string as show below.

I am adding the image because I was not able to edit it to show the exact format.

enter image description here

var html += '<td style='+msoStyle+'>(1,234)</td><td style='+msoStyle+'>1,234</td>';

The mso-number-format can be found in ms excel --> Number --> Custom option

When I check the generated html, the css looks like this :

enter image description here

Html page :

enter image description here

When I re-generate html string from the html table, the css style looks like this :

enter image description here

The excel generated from Aspose cells is giving me below output

enter image description here

Aspose cells version : 19.6 Java version : 1.8

Can you guys please help me where exactly I am going wrong. If you have any different solution for what I am trying to achieve, please let me know.

Regards, Ashish M

Upvotes: 1

Views: 225

Answers (0)

Related Questions