Swap two columns in Worksheet or Matrixsheet
BOOL SwapColumns( int nRight, int nLeft, BOOL bUndo = FALSE )
TRUE if success, otherwise FALSE
EX1
// Reverse the column order in the active worksheet void Datasheet_SwapColumns_Ex1() { Worksheet wks = Project.ActiveLayer(); if(wks) { for(int ii = 1; ii <= wks.GetNumCols() / 2 ; ii++) wks.SwapColumns(ii - 1, wks.GetNumCols() - ii); } }
origin.h