2.2.4.12.11 Datasheet::GetNumRows

Description

Get the number of rows in a worksheet or matrix.

Syntax

int GetNumRows( )

Parameters

Return

Returns the number of rows in the Datasheet including MatrixLayers and Worksheets.

Examples

EX1

//Get number of rows in the active datasheet.
void Datasheet_GetNumRows_Ex1()
{
    Layer lay = Project.ActiveLayer();
    if (!lay)
    	return;
    Datasheet ds(lay);
    int nRows = ds.GetNumRows();
    printf("The worksheet has %d rows",nRows);
}
//Get number of columns in the active matrixlayer.
void MatrixLayer_GetNumRows_Ex1()
{
	MatrixLayer ml = Project.ActiveLayer();
	if ( !ml )
	{
		printf("Can not access active matrixsheet");
		return;
	}
	printf("Rows %d\n", ml.GetNumRows());
	return;
}

Remark

Get the number of rows in a Datasheet including MatrixLayers and Worksheets.

See Also

Datasheet::GetNumCols, Datasheet::SetNumRows

Header to Include

origin.h