2.2.4.46.64 Worksheet::ReorderColumns


Description

Reorder the columns of worksheet with specified orders

Syntax

int ReorderColumns( const vector<uint> & vnIndices, int c1 = 0, BOOL bUndo = FALSE )


Parameters

vnIndices
[input] the orders of the columns to reorder
nC1
[input]The first column
bUndo
[input] undo or not


Return

0 if success, otherwise error code


Examples

EX1

void ReorderColumns_ex()
{
    Worksheet wks = Project.ActiveLayer();
    if(!wks)
	return;
    //reorder the first 2 cols
    if(wks.Columns.Count() < 2)
	return;
    vector<uint> vnIndices = {1, 0};
    int nRet = wks.ReorderColumns(vnIndices);
}


Remark

See Also

Header to Included

origin.h