Hi,
I created a simple document with Pivot Table in *.xlsx and *.xlsb format. It’s the same document converted from *.xlsx to *.xlsb by Excel, but Aspose.Cells returns different ranges for Pivot Tables.
*.xlsx
ColumnRange = [3, 1, 3, 6]
RowRange = [3, 0, 16, 0]
DataBodyRange = [4, 1, 16, 6]
*.xlsb
ColumnRange = [3, 1, 4, 6]
RowRange = [4, 0, 16, 0]
DataBodyRange = [5, 1, 16, 6]
Workbook wb = new Workbook(fName);
foreach(Worksheet ws in wb.Worksheets)
{
foreach(PivotTable pt in ws.PivotTables)
{
try { pt.RefreshData(); }
catch { }
try { pt.CalculateData(); }
catch { }
try { pt.CalculateRange(); }
catch { }
printLine(“ColumnRange”, rangeToStr(pt.ColumnRange), SPACE2); // my inner printing method
printLine(“RowRange”, rangeToStr(pt.RowRange), SPACE2);
printLine(“DataBodyRange”, rangeToStr(pt.DataBodyRange), SPACE2);
}
}
I use Excel 2010 and Aspose.Cells v7.3.5.1.