Hi beenyy,
// Worksheet column Data1_B must exist prior to execution.
void ttgp()
{
Column col("Data1", 1);
if(!col)
return;
//Must make sure the format of the column should be Text type
if( OKCOLTYPE_TEXT_NUMERIC != col.GetFormat() || OKCOLTYPE_TEXT != col.GetFormat())
col.SetFormat(OKCOLTYPE_TEXT_NUMERIC);
string str;
Dataset dsB("Data1_B");
dsB.SetSize(2);
for(int ii=0; ii<dsB.GetSize(); ii++)
{
str.Format("Row %d", ii);
dsB.SetText(ii, str);
}
}
Iris