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