Hello,
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
Thanks,
Ivan
Hi Ivan,
Hi,
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[0].Cells[“B2”].Value = 1;
wb.Worksheets[0].Cells[“B3”].Value = 2;
wb.Worksheets[0].Cells[“C2”].Value = 3.45;
wb.Worksheets[0].Cells[“C3”].Value = 6.78;
wb.CalculateFormula();
Aspose.Cells.Pivot.PivotTable pt = wb.Worksheets[1].PivotTables[0];
pt.CalculateData();
wb.Save(“PivotTest_out.xls”);
Thanks,
Ivan
Hi Ivan,
Hi,
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.
Thank you.
Hi,
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.
Best regards,
Ivan
Hi Ivan,
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.
Thank you.
Hi Shakeel!
Thanks a lot. It’s working now. Great job for you and your team
Ivan