ClearData
Clear worksheet of data and reduce number of rows (or optionally NOT reduce)
BOOL ClearData( DWORD dwOptions = CWOD_SHRINK_COLS, int nC1 = 0, int nC2 = -1, int nR1 = 0 )
TRUE if Successful else returns FALSE
EX1
// Active a worksheet, set the number of rows and note the effect of ClearData int Datasheet_ClearData_Ex1() { Worksheet wks = Project.ActiveLayer(); if(!wks) return -1; wks.SetNumRows(50); printf("Worksheet has %u rows before ClearData\n", wks.GetNumRows()); wks.ClearData(); printf("Worksheet has %u rows after ClearData\n", wks.GetNumRows()); return 0; }
//Clear the first matrixobject's data. void MatrixLayer_ClearData() { //make sure there exists active matrixlayer containing multiple matrixobjects and filled with data MatrixLayer ml = Project.ActiveLayer(); if ( !ml ) { printf("Can not access active matrixsheet"); return; } ml.ClearData(CWOD_SHRINK_COLS, 0, 0); //only clear the first matrixobject's data }
Clears all data in the data sheet
Datasheet::Reset
origin.h