Hi,
I have a pivot table data in sheet1. I would like to read the value of particular cell. But I couldn't. Cell values of the pivot table always returning null. How can I get the cell value from pivot table?
Thanks
foreach (Worksheet ptSheet in workbook.Worksheets)
{
foreach (XlsPivotTable pt in ptSheet.PivotTables)
{
IXLSRange loc = pt.Location;
for (int i = loc.Row; i <= loc.LastRow; i++)
{
for (int j = loc.Column; j <= loc.LastColumn; j++)
{
IXLSRange cell = ptSheet.Range[i, j];
string value = cell.Value;
}
}
}
}
XlsPivotTable.CalculateData();