Pivot tables corrupted on passing through Aspose.Cells

In our application using Aspose.Cells, the workflow is to load in a base Excel template, inject data into it, then resave the file and serve it up over the web.


We’ve recently found it necessary to begin using XLSX templates in place of XLS template files, and are now running into a problem when the original template contains pivot tables.

The generated XLSX file, when opened in Excel 2007, causes Excel to pop up a dialog saying “Excel found unreadable content in ‘filename.xlsx’. Do you want to recover the contents of this workbook?”. On clicking ‘Yes’, Excel then informs us that it was able to open the workbook by removing the unreadable content, with a message to this effect:

Removed Feature: PivotTable report from /xl/pivotCache/pivotCacheDefinition1.xml part (PivotTable cache)
Removed Feature: PivotTable report from /xl/pivotTables/pivotTable2.xml part (PivotTable view)
Removed Records: Workbook properties from /xl/workbook.xml part (Workbook)

I’ve boiled it right down to the simplest possible case. This is reliably reproducible, for me, by simply creating a named range containing a couple of header fields on a worksheet, adding a pivottable to a new worksheet that refers to the named range, and configuring the pivot table, and then having a program open and resave this workbook using Aspose.Cells. The resulting resaved workbook generates the error.

The attached XLSX file can be used as a basis for this test, together with the following console app code:

static void Main(string[] args)
{
string tmpFileName = Path.ChangeExtension(Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()), “xlsx”);

Workbook wkbk = new Workbook(“Pivot.xlsx”);
wkbk.Save(tmpFileName);

Process.Start(tmpFileName);
}

I’m using v5.1.1.0 of Aspose.Cells.



Hi,

I am able to see the problem and its been logged in our issue tracking system with an ID CELLSNET-18934. Once the problem is resolved, we will let you know.

Hi,

Please try the attached version, we have fixed your issue.

Thanks.

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


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Another regression in 5.1.3. Very simple example attached - just open and save as usual, i.e.


var wb = new Workbook(“myfile.xlsx”);
wb.Save(@“myfile-2.xlsx”);

When opened in Excel results in the corruption message.

Hi,

We are able to reproduce the issue. The issue has been logged into our Issue Tracking System with ID CELLSNET-20286. We will update you about the solution as soon as possible.

Thanks,

Hi,

Please try the attached version. We have fixed the issue.

Thank you.