2.2.4.12.16 Datasheet::ImportSPC

Description

Import SPC file into worksheet

Syntax

int ImportSPC( LPCSTR lpcszFilename, TreeNode & trInfo = NULL, DWORD dwOption = 0 )

Parameters

lpcszFilename
[input] import file's name
trInfo
[output] if not NULL, will get file's infomation. default is NULL.
dwOption
[input] import option. not work now.

Return

0 on success, otherwise returns error codes

Examples

EX1

//Import SPC file into worksheet 
void Datasheet_ImportSPC_Ex1()
{
    Worksheet wks;
    wks.Create();
    if(wks)
    {
        string strFileName = GetOpenBox("*.spc");
        if(strFileName.IsEmpty()) //user canceled
            return;
        
        Tree trInfo;
        int nRet = wks.ImportSPC(strFileName, trInfo);
        if(nRet != 0)
            printf("failed to import %s", strFileName);

    }
}

Remark

See Also

Header to Include

origin.h