2.1.14.4.11 sheet_find_empty_dataobject


Description

Find first DataObject of last empty range in the specified Datasheet starting with the specified DataObject.

Syntax

int sheet_find_empty_dataobject( Datasheet & ds, int nStartObj = 0 )

Parameters

ds
[input]The Datasheet to search.
nStartObj
[input]The index of the column to start the search

Return

If last empty range is found return the index of first DataObject else return -1.

Examples

EX1

void sheet_find_empty_dataobject_ex1()
{
	//Make sure a worksheet or matrixlayer is active in current project
	Datasheet dsh = Project.ActiveLayer();
	if ( dsh )
	{
		int nEmptyObj = sheet_find_empty_dataobject(dsh);
		if ( nEmptyObj < 0 )
			printf("No empty dataobject in %s", dsh.GetName());
		else
			printf("First empty dataobject's index in %s is %d", dsh.GetName(), nEmptyObj);
	}
}

Remark

See Also

Header to Include

origin.h

Reference