2.2.4.46.46 Worksheet::InsertRow

Description

Insert an empty row in the worksheet

Syntax

BOOL InsertRow( int nPos, BOOL bUndo = FALSE )

Parameters

nPos
[input] Row number to insert before (zero offset)
bUndo
[input] Whether to support Undo (TRUE) or not (FALSE).
Its default value is FALSE.

Return

TRUE on success, otherwise FALSE

Examples

EX1

// First worksheet in project should have 12 rows of data to see effect
int Worksheet_InsertRow_Ex1()
{
    WorksheetPage wp = Project.WorksheetPages(0);
    if(!wp)
        return -1;
    
    Worksheet wks(wp.GetName());
    return (int)wks.InsertRow(10);
}

Remark

Insert an empty row in the worksheet

See Also

Worksheet::DeleteRow, Worksheet::AppendRows, Worksheet::InsertCol

Header to Include

origin.h