Source excel file (Office 2003) has Worksheet with Pivot containing formated cells (some rows have integers, some decimals, and some percenteges).
After opening excel with Aspose.Cells, filling datasource for Pivot, executing CalculateData() on Pivot, and saving file, all formats are lost when I open that file later in Excel (all are set to “General”).
Is there a bug or something not resolved yet?
I’am using latest relese 5.3.3
Problem is still there and I attached sample excel I used. Saved file does not contain formated cells in Pivot. Code to reproduce is simple:
Aspose.Cells.Workbook wb = new Aspose.Cells.Workbook(“PivotTest.xls”);
wb.Worksheets.Cells[“B2”].Value = 1;
wb.Worksheets.Cells[“B3”].Value = 2;
wb.Worksheets.Cells[“C2”].Value = 3.45;
wb.Worksheets.Cells[“C3”].Value = 6.78;
Aspose.Cells.Pivot.PivotTable pt = wb.Worksheets.PivotTables;
After testing your case, I have found the issue you talked about. After using your sample code with your template file, the output file has lost the formatting
(regarding Numbers) in the second sheet i.e. “Pivot”. I can find that right-clicking on the cells e.g “B3”, “C3” etc. and clicking the “Format Cells…”, it has been set to “General” instead of “Number”. I have logged an issue with an id: CELLSNET-27993. We will look into your issue soon.
The number format is not set to General in input. I’m sending you screenshots of input I sent you and output you sent to me. As you can see, not only that number formats are not preserved but Font Type and Column width also.
I opened files in MS Excel 2003 and 2007. Both with same result.
I hope that you will resolve this issue.
Thanks for the sample screen shots.
I have already found and logged your issue with an id: CELLSNET-27993. We will figure it out soon.
We have fixed this issue. Please download: Aspose.Cells for .NET v220.127.116.11.
Thanks a lot. It’s working now. Great job for you and your team