Delete rows in the worksheet
int DeleteRows( const vector<uint> & vRowsToDel, int nC1 = 0, int nC2 = -1, DWORD dwCntrl = 0 )
a negative for error, otherwise the number of the deleted rows
EX1
//Delete rows in the worksheet. void Worksheet_DeleteRows_ex1() { Worksheet wks = Project.ActiveLayer(); if ( wks ) { //if wks filled with row number, row 2, 4, 6, 8, 10 will be deleted after the following code vector<uint> vnRowsToDel = {1, 3, 5, 7, 9}; wks.DeleteRows(vnRowsToDel); return; } }
Delete the specified rows from the worksheet.
Bits to control how DeleteRows behave:
typedef enum tagWKSDELROWSCTRL
{
WDR_INPUT_SORTED_ASC = 0x0001, // input array has been sorted ascending which will del from end
WDR_NO_SHOW_STATUS = 0x0002, // default will show progress row index on status
WDR_USE_SELECTIONS = 0x0010, // this is the only way to support undo and styles, but much slower
WDR_UNDO = OCD_UNDO, //0x01000000 must use together with WDR_USE_SELECTIONS
} WKSDELROWSCTRL;
Worksheet::DeleteRow, Worksheet::InsertRow, Worksheet::AppendRows
origin.h