Set data by column offset index.
BOOL SetColumnData( vector & v, BOOL bUndo = FALSE, int index = 0 )
TRUE if success.
// For this example to run successfully, an Origin workbook should be the active
// window. The function will put 100 numbers into the rows starting with the 5th row
// of columns whose total number is specified by the first argument, starting with
// the 7th column.
void test_SetColumnData(int nCountColumnsToSet = 1, BOOL bUndoable = 0)
Worksheet wks = Project.ActiveLayer();
out_str("Invalid active window!");
// All the data will be added srarting from the 5th row
// in the 7th column:
dr.Add("", wks, 4, 6, 4, 6);
for(int ii = 0; ii < nCountColumnsToSet; ii++)
if(!dr.SetColumnData(vv, bUndoable, ii))
out_str("Failed to set column data!");
It sets the data by column offset index. It adds columns as needed. The data is put into one column only. The column is determined as the index'th offset from the top left corner of the first range in this DataRange object, whose name is either empty or "X". Columns are added to the worksheet as needed.