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