Tables as DataSource for PivotTable broken using Designer

Hi guys,


I’m using the latest version of Aspose.Cells, 7.1.2.0.

I’ve got a Designer Template .xlsx file with two Worksheets in it.
One is a table, populated by SmartMarkers.
The second is a PivotTable, using the Table in the first sheet as a datasource.

In my application, I open the Template, create a WorkbookDesigner object and Process the workbook with a datasource.

The SmartMarker data binds fine, however the PivotTable’s datasource is now incorrect - Aspose.Cells has replaced it with another reference.

If you refer to the attached Solution, you can clearly see in the ‘before’ and ‘after’ variables, that the DataSource changes from the named range ‘Table1’ to a cell reference which is not correct.

It is my expectation that if I set the datasource for a PivotTable to a Table (listobject) then that datasource will remain correctly attached to that table.

I have tried the same using a global named range that covers the span of the table, which works correctly, however I shouldn’t have to duplicate a range like that for every pivot table datasource.

Can you guys take a look at this?

Cheers,
Seb

Hi,


I am able to reproduce the issue as you have described by running your project with latest version/fix. I have logged a ticket with an id: CELLSNET-40486. We will look into it soon.

Thank you.

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

Please download and try the latest version:
Aspose.Cells
for .NET v7.1.2.1



Please use PivotTable.ChangeDataSource method to change the data source of pivot table.

Let me know your feedback.

Hi,


Thanks for your rapid response!

The updated DLL has not fixed the issue, unfortunately.

If you compare the names of the DataSources in the variables ‘before’ and ‘after’, you can clearly see that ‘before’ the DataSource is ‘Table1’ and after’ the DataSource switches to ‘Sheet1!$A$2:$C$4’.

The reference ‘Sheet1!$A$2:$C$4’ is incompatible for a PivotTable, since it cannot infer the column headers from the range. If the reference ‘Table1’ was kept, then Excel could lookup the column headers itself. In my mind, there is no reason why the reference should be changed from ‘Table1’?

Regards,
Seb

Hi,

Thanks for your feedback.

We have also logged your comments in our database.

We will look into it and get back to you asap.

Hi,



We have fixed this issue. Please download: Aspose.Cells for .NET v7.1.2.2

Cheers!


Works fine now!

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


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