It appends or inserts a column to worksheet at a desired position.
int wks_insert_column( Worksheet & wks, int nDesiredColumnPosition, Column & col )
the actual index of the added column, which can be different from nDesiredColumnPosition even if nDesiredColumnPosition >= 0.
EX1
void wks_insert_column_ex1() { Worksheet wks; wks.Create(); int nDesiredColumnPosition =0; //note: not set size Dataset ds(wks.Columns(0)); ds = 0; ds.Attach(wks.Columns(1)); ds = 1; //Will insert column to first column. Column col; int nRet = wks_insert_column(wks, nDesiredColumnPosition, col); if(nRet != nDesiredColumnPosition || !col) out_str("wrong place of new column"); }
origin.h