Total number of rows in a pivot table

I would like to know if there is a way to get or calculate the total number of rows in a pivot table. Preferably, this would include header and total rows, but I can compensate for these if necessary.

Hi,


Well, I think you may try to use PivotTable.GetSource() method that returns string array, you may use it to get the data source of PivotTable, you may use it.

Moreover, you may use PivotTable.RowRange attribute to get the CellArea that you may calculate for your need.

Thank you.

Thanks for your reply.


I already looked into the RowRange property, but it does not seem to be useful to me. I evaluated it during debugging, and its StartRow and EndRow seem to be the beginning row of the pivot table and the beginning row of the first RowField. I have not been able to figure out where the RowFields beign.

Also, I was not able to find a GetSource() method on the pivot table object.

FYI, I am using version 5.2.1.0.

Hi,


Please try our latest version/fix v7.0.0 (http://www.aspose.com/community/files/51/.net-components/aspose.cells-for-.net/entry324931.aspx). We have made many enhancements regarding pivot tables in the recent versions/fixes. If you still find any issue, give us your template file and paste sample code here, we will check your issue soon.

Thank you.