Quantcast
Channel: ClosedXML - The easy way to OpenXML
Viewing all articles
Browse latest Browse all 1877

Commented Unassigned: Worksheet.PivotTables is always empty [9378]

$
0
0
My .xlsx file contains a Pivot Table. But I can't get access to it via `Worksheet.PivotTables` property.

This is my sample code:

```
using (var excel = new XLWorkbook(sourceFile, XLEventTracking.Enabled))
{
var pivots = excel.Worksheets.SelectMany(ws => ws.PivotTables).ToList();
// pivots.Count == 0
}

```
The version of the ClosedXML library is 0.75.0 (got from NuGet)

The example of .xml file is attached.


Comments: I just noticed the same problem, I cannot load any pivot table that exists in a worksheet. Only adding a new PivotNable via the library seems to populate the PivotTables property. I guess it is impossibile at the moment to modify a pviot table that already exists in the Excel file. :(

Viewing all articles
Browse latest Browse all 1877

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>