2.2.4.46.2 Worksheet::AppendRows

Description

Append rows to the worksheet

Syntax

BOOL AppendRows( int nRows = 1 )

Parameters

nRows
[input] Number of rows to append; 1 by default.

Return

If the function succeeds, the return value is TRUE. If the function fails, the return value is FALSE.

Examples

EX1

// Append 10 rows to the active worksheet in the first workbook.
void Worksheet_AppendRows_Ex1()
{
    // Get first workbook.
    WorksheetPage wp = Project.WorksheetPages(0);
    if(!wp)
        return;

    // Get the workbook's active worksheet.
    Worksheet wks(wp.GetName());

    printf("Worksheet has %d rows\n", wks.GetNumRows());

    // Append 10 rows to the worksheet.
    if(wks.AppendRows(10))
        printf("Worksheet now has %d rows\n", wks.GetNumRows());
    else
        printf("Failed to append rows to worksheet\n");
}

Remark

Append rows to the worksheet

See Also

Worksheet::InsertRow, Worksheet::DeleteRow

Header to Include

origin.h