# GetRowCount

Use the GetRowCount method to get the number of rows in the displayed page on the client. Learn its syntax and parameters in documentation.

## Content

Gets the number of rows in the displayed page on the client.

## Syntax

[JavaScript]

```javascript
var ret = FpSpread1.GetRowCount();
```

## Parameters

None

## Return Type

Integer, number of rows

## Remarks

This method returns a count of the rows in the displayed spreadsheet on the client. For a count of the columns, refer to [GetColCount](/spreadnet/docs/latest/online-asp/overview/spweb-clientscriptref/clientscript-members/clientscript-allmeths/CSSR-GetColCount).

## Example

This is a sample that uses the method to count the rows in order to get a value from each row. On the client side, the script that contains the method would look like this:

```javascript
<script type="text/javascript">
   function doCalc() {
     var roco = FpSpread1.GetRowCount();
     var total = 0;
     for (var i=0; i<roco-1; i++) {
       var value = parseFloat(FpSpread1.GetValue( i, 0 ));
       if(!isNaN(value))
       total += value;
     }
     if (!isNaN(total))
       FpSpread1.SetValue(n-1, 0, total, true);
   }
</script>
```

## See Also

[GetColCount](/spreadnet/docs/latest/online-asp/overview/spweb-clientscriptref/clientscript-members/clientscript-allmeths/CSSR-GetColCount)
[GetTotalRowCount](/spreadnet/docs/latest/online-asp/overview/spweb-clientscriptref/clientscript-members/clientscript-allmeths/CSSR-GetTotalRowCount)
[Scripting Members](/spreadnet/docs/latest/online-asp/overview/spweb-clientscriptref/clientscript-members)