How to get Column and Row count of a Pivot Table

Posted by: tbui on 11 March 2022, 6:57 pm EST

  • Posted 11 March 2022, 6:57 pm EST

    Hi,

    I am having difficulty trying to figure out how to get the column and row count of a pivot table. I tried using getRange() on the pivot table and using colCount and rowCount, but am not getting any results.

    Any advice would be appreciated.

    -TB

  • Posted 14 March 2022, 2:43 am EST

    Hi,

    You can get the rowCount/colCount of Pivot Table using pivotTable.getRange() method.

    For getting row count use pivotTable.getRange().content.rowCount and for getting the column count, use pivotTable.getRange().content.colCount

    Please refer to the attached sample demonstrating the same.

    getRange method: https://www.grapecity.com/spreadjs/docs/latest/online/SpreadJS~GC.Spread.Pivot.PivotTable~getRange.html

    If the issue still persists for you please share a working so that we can investigate and assist you accordingly.

    Regards

    Ankit

    sjs-angular-app1.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels