GetSPCSubheader

 

Contents

Description

Get SPC subheader information from worksheet. This function requires the subheader counter from the main header structure. Therefore, the OSPCMAINheader information has to be retrieved successfully first to be able to use this function.

Syntax

BOOL GetSPCSubheader( LPCSTR lpcszWksName, int nCol, OSPCSUBheader * SPCSubheader, int nIndex )

Parameters

lpcszWksName
[input] Worksheet name
nCol
[input] Column index from 0
SPCSubheader
[output] SPC sub header structure
nIndex
[input] The index of subheader from 0

Return

TRUE means the subheader information is retrieved successfully

FALSE indicates the failure in retrieving subheader information

Examples

EX1

// Assume a Worksheet exists in the project
int    OKdll_GetSPCSubheader_Ex1()
{
    string            strWks = Project.WorksheetPages(0).GetName();
    Worksheet        wks(strWks);
    OSPCMAINheader    spcMainheader;
    int                iNumOfSubs;
    for(int jj = 0; jj< wks.GetNumCols();jj++)
    {
        if( GetSPCMainheader(strWks, jj, &spcMainheader) )
        {
            //read information from the main header
            iNumOfSubs = spcMainheader.fnsub;
            OSPCSUBheader spcSubheader;
            for( int ii = 0; ii < iNumOfSubs; ii++ )
            {
                if( GetSPCSubheader(strWks, jj, &spcSubheader, ii) )
                    //read information from the subheader
                    printf("%u\n", ii);
            }
        }    
        string    strLog;
        strLog = GetSPCLog(strWks, jj);
    }
    return iNumOfSubs;
}

Remark

See Also

header to Include

origin.h

Reference