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 values for ‘GetSource()’.
*.xlsx
GetSource() = “Sheet1!$A$1:$N$9Sheet1!$A$12:$N$20”
*.xlsb
GetSource() = null
Steps to create a Pivot Table with multiple consolidation ranges:
Alt+D+P
Multiple consolidation ranges
…
Select two source ranges
…
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 { }
try { printLine(“Source”, String.Concat(pt.GetSource()), SPACE2); } // my inner printing method
catch { printLine(“Source”, " ============== ERROR ============== ", SPACE2); };
}
}
I use Excel 2010 and Aspose.Cells v7.3.5.1.
Best regards,
Alex Shloma