Get the beginning and ending row indices for the specified columns in this Worksheet. This is an improved version of GetBounds with more detailed controls on handling of missing and text values
BOOL GetRange( int & iR1, int & iR2, int iC1 = 0, int iC2 = -1, int nAdjustLowerIndex = GDR_SKIP_NON_NUMERIC, int nAdjustUpperIndex = GDR_SKIP_NON_NUMERIC )
Returns TRUE on success and FALSE on failure.
EX1
void Worksheet_GetRange_Ex1() { Worksheet wks = Project.ActiveLayer(); int nR1, nR2; wks.GetRange(nR1, nR2); // Convert to LabTalk column number indexing by adding 1 printf("%s[%d:%d]\n", wks.GetPage().GetName(), nR1+1, nR2+1); // show rows for each column foreach(Column cc in wks.Columns) { vector v(cc); printf("Col(%s)[%d:%d]\n",cc.GetName(), v.GetLowerBound()+1, v.GetUpperBound()+1); } }
Worksheet::SetRange, Worksheet::GetBounds
origin.h