Find first column of last empty range in the specified worksheet starting with the specified column.
int wks_find_empty_column( Datasheet & wks, int nStartCol = 0 )
If last empty range is found return the index of first column else return -1.
EX1
int WksFirstEmptyColumn(LPCSTR lpcszWks) { if( NULL == lpcszWks ) return -1; Worksheet wks(lpcszWks); if( !wks ) return -1; int nEmptyCol = wks_find_empty_column(wks); if( -1 == nEmptyCol ) printf("No empty columns in %s\n", wks.GetName()); else printf("First empty column in %s is column %d\n", wks.GetName(), nEmptyCol); return nEmptyCol; }
origin.h