SetMissingValue
Set Missing Value to each Column or MatrixObjects in the specified range This function will not change internal data type, should just set missing value if nType matchs and immediately return if not
int SetMissingValue( int nType, LPVOID pVal, int nC1 = 0, int nC2 = -1 )
return 0 if success, > 0 with 1-offset col index where it failed
return < 0 error code when col/mat type does not match nType and other error codes.
EX1
//Set the value of 1E-10 cells to missing value. void Datasheet_SetMissingValue_Ex1() { Worksheet wks; wks.Create(); if(wks) { int nType = FSI_MIXED; double dMissing = 1E-10; int nRet = wks.SetMissingValue(nType, &dMissing); string strMessage = "Succeed to set missing value to workbook " + wks.GetPage().GetName(); if(nRet > 0) strMessage = "Failed to set the " + ftoa(nRet) + "th Column"; else if(nRet < 0) strMessage = "col/mat type does not match nType or other error"; printf("%s\n", strMessage); } }
origin.h