Worksheet::Open

Description

Open a new worksheet from the supplied OGW file and attaches it to the object.

Syntax

BOOL Open( LPCSTR lpcszFileName, int nOption = CREATE_VISIBLE )

Parameters

lpcszFileName
[input] The OGW file name
nOption
[input] Options from CREATE_TEMP, etc (OC_const.h). Defaults is CREATE_VISIBLE.

Return

TRUE for success; otherwise FALSE.

Examples

EX1

//Open a new worksheet from the supplied OGW file and attaches it to the object. 
void Worksheet_Open_Ex1()
{
    Worksheet wks;
    string strOGW = "c:\\myfile.ogw";
    
    int nOption = CREATE_VISIBLE_SAME;
    BOOL bRet = wks.Open(strOGW, nOption);
    
    printf("Returned %u, Name = %s\n", bRet, wks.GetName());
}

Remark

See Also

Datasheet::Create

header to Include

origin.h