Get SPC main header information from worksheet
BOOL GetSPCMainheader( LPCSTR lpcszWksName, int nCol, OSPCMAINheader * SPCMainheader )
TRUE means the header information is retrieved successfully
FALSE indicates the failure in retrieving header information
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); } }
origin.h