1

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

Newinjava
  • 972
  • 1
  • 12
  • 19
  • You are using an older version of Aspose.Cells, so I would recommend you to kindly try out latest version v21.8 to check if it fixes your issue. If you still find the issue, kindly do share your input HTML file (or give exact HTML file contents/scripts). We will check your issue soon. By the way, you may also post your queries/issue in dedicated Aspose.Cells forum (https://forum.aspose.com/c/cells/9). PS. I am working as Support developer/ Evangelist at Aspose. – Amjad Sahi Aug 25 '21 at 17:57

0 Answers0