I’ve encountered an error while working with pivot tables and refreshing these after loading new data into the Excel sheet. When I run .RefreshData() on the pivot tables it throws an exception: “this data source is not supported”. The pivot only uses local data from the same Excel file - no external data.
I found the problem while working with PowerPivot (which is not supported by Aspose.Cells currently), but it can also be reproduced using “normal” pivot tables where the data (tables) have relationships set.
I have attached an example project and an example Excel sheet illustrating the problem. I’m using Aspose Cells 8.6.0.
Thanks for your posting and using Aspose.Cells.
We were able to replicate this exception by executing the following sample code with your source excel file using the latest version: Aspose.Cells
for .NET v184.108.40.206.
We have logged this issue in our database for investigation. We will look into it and fix this issue. Once the issue is resolved or we have some other update for you, we will let you know asap.
This issue has been logged as
- CELLSNET-44032 - Refreshing pivot table throws exception: "this data source is not supported"
I have also attached the source excel file used in this code for a reference.
string filename = @“D:\Downloads\t\Book1.xlsx”;
var excel = new Aspose.Cells.Workbook(filename);
//refresh pivot tables
foreach (Worksheet sheet in excel.Worksheets)
foreach (PivotTable pivotTable in sheet.PivotTables)
A first chance exception of type ‘Aspose.Cells.CellsException’ occurred in Aspose.Cells.dll
at AsposeProject.Program.f1() in d:\Aspose\Projects\NET\AsposeProject\AsposeProject\Program.cs:line 764
at AsposeProject.Program.Main(String args) in d:\Aspose\Projects\NET\AsposeProject\AsposeProject\Program.cs:line 260
A first chance exception of type ‘Aspose.Cells.CellsException’ occurred in AsposeProject.exe
Same issue… when Excel have connection to database and call resresh show this message. Any news?