Reorder the columns of worksheet with specified orders
int ReorderColumns( const vector<uint> & vnIndices, int c1 = 0, BOOL bUndo = FALSE )
0 if success, otherwise error code
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); }
origin.h