Hi,
Runtime error here because when call Temp.SetSize(Size); Temp is an invalid object, should let Dataset attach to one column before SetSize. So change code to:
Temp.Attach(wks, nCol);
Temp.SetSize(Size);
BTW, I saw in for statement "int nCol=0; nCol < wks.GetNumCols()-1", this condition will NOT loop to the last column. If you want to loop to the last column, need change to nCol <= wks.GetNumCols() -1 or nCol < wks.GetNumCols()
Iris