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.
BOOL GetSPCSubHeader( LPCSTR lpcszWksName, int nCol, OSPCSUBHeader * SPCSubHeader, int nIndex )
TRUE means the subheader information is retrieved successfully
FALSE indicates the failure in retrieving subheader information
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; }
origin.h