I want to display a row count for my pivot table, but I want to do so while considering only rows that have data values in it. I don’t want to include header rows or totals in my row count. Headers shouldn’t be included. I only want to count rows with values.
I found this example for row count, but it gives full row count.
Thank you for contacting us.
Flexmosnter does not provide the possibility to retrieve the row count that would not include headers and totals.
Please let us know what is the final purpose of this method. This information may help us find a workaround for your case.
Looking forward to hearing from you.
The final purpose is to count only data value rows without including the header rows in the count.
For example, in the forum post I previously mentioned, they use a jsfiddle:
It has 2 header rows. The row count for our purposes should be pivot.gridRowCount() – 2.
How do we reliably include the header row count in our row count calculations?
Currently, there is no known workaround to count rows and exclude all the header and total rows.
Please let us know if other questions arise.
Is it not possible to count the headers and/or total rows?
row count – header row count = desired row count?
At the very least, how do I display the pivot table line numbers?
In our case, the row/column line numbers are not currently displayed.
Is there a way to toggle or set this?
Despite a simple formula, Flexmonster does not provide a possibility to retrieve a number of rows/columns occupied by headers. The same is applicable for rows taken by totals.
Concerning rows and columns numeration, we suggest whether the
grid.showHeaders property of the Options Object is not set to
false in your case. This property indicates whether the spreadsheet headers are visible (
true) or not (
Here is a JSFiddle for demonstration: https://jsfiddle.net/flexmonster/xw6b4tm5/.
We hope it helps.