InsertCol
Insert an empty column in the worksheet with the given name and store the name in a string. If the given name already exists then increment it. The actual name created is returned by reference
BOOL InsertCol( int nPos, LPCSTR lpcszColName, string & strColNameCreated, BOOL bUndo = FALSE )
True for success, otherwise FALSE
EX1
//Output the column name of the inserted column. int Worksheet_InsertCol_Ex1() { WorksheetPage wp = Project.WorksheetPages(0); if(!wp) return -1; Worksheet wks(wp.GetName()); string strColName = "NewColumn"; string strColNameCreated; BOOL bOK = wks.InsertCol(1, strColName, strColNameCreated); // Insert an empty column at the 1st column ( 0 offset) printf("Column Name created is %s\n", strColNameCreated); return (int) bOK; }
Worksheet::DeleteCol, Worksheet::InsertRow
origin.h