2.2.4.46.11 Worksheet::DeleteCol

Description

Delete a column in the worksheet

Syntax

BOOL DeleteCol( int nCol, DWORD dwCtrls = 0 )

Parameters

nCol
[input] Column number to delete (zero offset)
dwCtrls
[input] options from WKSDELETECOL_* enumeration.

Return

TRUE on Success, otherwise FALSE

Examples

EX1

//Delete the first column in the worksheet.
bool Worksheet_DeleteCol_Ex1()
{
    WorksheetPage wp = Project.WorksheetPages(0);
    if( wp )
    {
        Worksheet wks(wp.GetName());
        if( wks )
            return wks.DeleteCol(0); // Delete first column
    }
    return false;
}

Remark

The dwCtrls parameter uses the following WKSDELETECOL enumerations:

Enum Function
WKSDELETECOL_LEAVE_OPER_RANGES If the column is being deleted is a part of a Recalculate operation output, use this bit will keep the Recalculate mode and only delete this column. If the column is the first column in the Recalculate operation output, this bit will be invalid.

See Also

Worksheet::AddCol, Worksheet::InsertCol, Worksheet::DeleteRange, Worksheet::DeleteRow, Worksheet::DeleteRows

Header to Include

origin.h