2.1.13.8 GetSPCMainHeader


Description

Get SPC main header information from worksheet

Syntax

BOOL GetSPCMainHeader( LPCSTR lpcszWksName, int nCol, OSPCMAINHeader * SPCMainHeader )

Parameters

lpcszWksName
[input] Worksheet name
nCol
[input] Column index from 0
SPCMainHeader
[output] SPC main header structure

Return

TRUE means the header information is retrieved successfully

FALSE indicates the failure in retrieving header information

Examples

EX1

// Assume a Worksheet exists in the project
void    SPC_GetSPCMainHeader_Ex1()
{
    string strWks = Project.WorksheetPages(0).GetName();
    Worksheet wks(strWks);
    OSPCMAINHeader spcMainHeader;
    for(int jj = 0; jj< wks.GetNumCols();jj++)
    {
        if( GetSPCMainHeader(strWks, jj, &spcMainHeader) )
        {
            //read information from the main header
            int iNumOfSubs = spcMainHeader.fnsub;
            OSPCSUBHeader spcSubHeader;
            
            for( int ii=0; ii<iNumOfSubs; ii++ )
            {
                if( GetSPCSubHeader(strWks, jj, &spcSubHeader, ii) )
                    //read information from the subheader
            }            
        }
        string strLog;
        strLog = GetSPCLog(strWks, jj);
    }
}

Remark

See Also

Header to Include

origin.h

Reference