Datasheet::Attach

Description

Attach worksheet object to a real Origin worksheet

Syntax

BOOL Attach( LPCSTR lpcszWksName )

Parameters

lpcszWksName
[input] The name of an Origin worksheet object

Return

TRUE if the worksheet exists; FALSE if the worksheet does not exist

Examples

EX1

// Attach worksheet to the first worksheet page in the Project.
void Datasheet_Attach_Ex1()
{
    Worksheet wks;
 
    WorksheetPage wp = Project.WorksheetPages(0);
    if(!wp)
        return;
 
    if (wks.Attach(wp.GetName()))
        printf("Success to attach worksheet");
    else
        printf("Fail to attach worksheet");
}

Remark

Attach to an Origin worksheet.

See Also

Column::Attach, MatrixObject::Attach

header to Include

origin.h