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