We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Incorrect result with some formatting strings

Hi Guys,

I found some unexpected behaviours when I format a cell with some custom strings. Attached is the file I tested with.

The double value of C7 is 7975723.64986856. With the format string as _(* #,##0.0,,_);[Red]* (#,##0.0,,);_(* "-"_);_(@_), I supposed to see "8.0" as string value but I didn't.

Check with format string 0.00E+00, which give me the right string value of "7.98E+06". But if I modify it to ##0.0E+0, I get 7975723.6E+0 instead of 8.0E+6 that shown in Excel.

I guess there is some round problem with Aspose.Cells. Can you please investigate and let me know? It is very urgent since we already release our software to many clients. Thanks.

.NET and MS Excel don't convert the double value to string in the same way. That caused this problem. I will check and fix it ASAP.

Please try this attached fix.

Hi Laurence,

Thank you for the fix, it works.

William Ren

Hello Laurence,

I did a complete test on the fix It appeared the problem with formatting was still there and Excel custom formatting isn't supported very well. Attached is the Excel file I tested with.

On cells c7:c10 and e7:e10, I saw correct numbers in Excel as follows:

8.0 (2.2)

$453,937 -$ 618,190

498 (122)

917.8 (175.8)

But when I used Cell.StringValue to show data, I got the following results:

8.0 *(2.233,874.9)

-$453,937- -$* 618,190_-

498 *(122)

917.8 *(175,796.7)

Those are kind of mess and I cannot give client these results. I think there are still some issues with converting Excel format to .Net format.

William Ren

Clarity Systems

Hi Laurence,

Could you please fix the bug I mentioned above ASAP? Thanks.

William Ren

Clarity Systems


Thanks for considering Aspose,

You excel file help us find some issues with Custom Formats. We will fix it soon.

Thanks for being patient!

Hi Amjad,

I am wondering when I can get the fix. Thanks.

William Ren

Clarity Systems Ltd.


A month has been passed, I am wondering when I can get the fix for this issue. Thanks for your help.

William Ren

Clarity Systems

Please try this attached version.