IsEmpty
Check DataRange is valid or all the subranges are empty
BOOL IsEmpty( )
TRUE if DataRange is invalid or all the subranges are empty, FALSE otherwise
EX1
//Check if the datarange is invalid or is empty. void DataRange_IsEmpty_Ex1() { Worksheet wks; wks.Create("Origin"); if( wks ) { while(wks.Columns(0)) wks.DeleteCol(0); wks.AddCol("A"); wks.AddCol("B"); wks.AddCol("C"); DataRange dr; // dr does not include any subrange, bValid = TRUE, bool bValid = dr.IsEmpty(); dr.Create(); dr.Add(); // dr includes a empty subrange, bValid = TRUE bValid = dr.IsEmpty(); // dr includes a non-empty subrange and a empty subrange, bValid = FALSE dr.Add("X", wks, 1, 1, 4, 2 ); bValid = dr.IsEmpty(); } }
DataRange::GetNumRanges
origin.h