Fri Sep 30, 2011 1:19 pm
Hi,
I downloaded the latest Spire.XLS version( 6.0.4.2) but it looks that the pivot table still doesn't work.
My test is simple. I just load a xls file that contains a pivot table and some sample data, and then save it to disk with a new name.
my source code:
Workbook workbook = new Workbook();
workbook.LoadFromFile(@"c:\ReportFolder\MyPivotTableSample.xls");
workbook.SaveToFile("c:\\ReportFolder\\Sample_" + Guid.NewGuid().ToString().Substring(0,6) + ".xls");
If I open the original file with Microsoft Excel, it's open without problem.
But if I try to open the new Sample_xxxxxx.xls file I get an error: Microsoft Excel has stopped working. A problem caused the program to stop working correctly.
If I try also to save as xlsx file
workbook.SaveToFile("c:\\ReportFolder\\Sample_" + Guid.NewGuid().ToString().Substring(0, 6) + ".xlsx",ExcelVersion.Version2007);
I have following error at runtime: Name of worksheet must be unique in a workbook.
Please let me know if I miss something or the pivot table is not fixed yet into version 6.0.
Thanks