For this specific case this should work:
Names Default To Here(1);
dt = New Table("Untitled 5",
Add Rows(6),
Compress File When Saved(1),
New Column("Column 1",
Character,
"Nominal",
Set Values({"ID", "1122", "Name", "Johan", "David", "Jack"})
),
New Column("Column 2",
Character(16),
"Nominal",
Set Values({"", "", "Age", "23", "34", "27"})
)
);
wait(1);
//get column name
columnNameCell = dt[1,1];
//get cell value
valueCell = dt[2,1];
//Rename columns
Column(dt,1) << Set Name(dt[3,1]);
Column(dt,2) << Set Name(dt[3,2]);
//Remove extra rows
dt << Delete Rows([1,2,3]);
//create new column
dt << New Column(columnNameCell, Character, Nominal, << Set Each Value(valueCell));
//Move ID column
dt << Move Selected Columns(:ID, To First);
For modifications like this I think Data Table Subscripting is very helpful
-Jarmo