Free Support Forum - aspose.com

Problem with cell formatting in generated file

Hi,

We have problem with cell formatting in generated XLSX file in 5.3.3.0 version (same problem actually exists in 4.7.1.0 version).

If you open attached file "test.xlsx", you'll see a number "152" in formatted cell C5 (Sheet1). Formatting applied is...

  • Font size set to Calibri 8pt
  • Background color set to "White Background 5% darker"

Now, if you change formatting of that cell to currency using "$" button in number options, it works OK.

So, "test.xlsx" is the template we use when opening new workbook instance through Aspose.Cells.

We do not manipulate any cell, sheet or any workbook option and just save it through Aspose.Cells as "DATA2011-06-02-18-41-01.xlsx" to harddrive (SaveFormat.Xlsx).

If you change formatting of that same cell to currency using "$" button in number options, it loses all formatting (both font size and background color).

So, it's something in Aspose.Cells causing this as file created/saved directly through Excel works OK.

We validated this behavior in both Excel 2007 and Excel 2010.

Any ideas on solving this? Is there any property to set?

Hi,

"So, “test.xlsx” is the template we use when opening new workbook instance through Aspose.Cells.

We
do not manipulate any cell, sheet or any workbook option and just save
it through Aspose.Cells as “DATA2011-06-02-18-41-01.xlsx” to harddrive
(SaveFormat.Xlsx).

If you change formatting of that same cell to
currency using “$” button in number options, it loses all formatting
(both font size and background color)."


I could not find the issue as you have mentioned. I tested your output file “DATA2011-06-02-18-41-01.xlsx” file into MS Excel 2007 and right click on the C5 cell to click “Format Cells…”, the I select “Currency” (the symbol is “$”) and then I click OK. It works fine. The font is still Calibri 8 (as was in the “test.xlsx” file), the background color is also the same.

Could you give us screen shots to show the issue, it will help us to find the issue.


thank you.

Yes, I know "Format cells" -> "Currency" works. The problem is, customer is too used to using the "$" button in menu as it's faster.

See 2 attachments.

First one is taken before clicking the "$" button.

Second one is taken after clicking the "$" button.

You can see the formatting lost. If I do the same in test.xlsx that was not save through Aspose.Cells but directly in Excel, I do not lose formatting.

Hi,

Thanks for sharing us the screen shots:

I have found the issue as you have mentioned. When I just opened
and re-saved your file “test.xlsx”, the “$” formatting would make the
existing formatting disappeared (font attributes and background color of the cell C5 etc.)



I have logged your issue with an id:
CELLSNET-28036. We will figure it out soon.

Thank you.

Thanks,

Martin

Hi,

We have fixed this issue. Please download Aspose.Cells for .NET 5.3.3.4

The issues you have found earlier (filed as 28036) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Thanks.

We've retested and it's working as expected with 5.3.3.4 version.

Martin