Modify-Column-Name
Command Description
Modify column names of a datatable
Command Prototype
Datatable.ModfiyColumns(dtTable,aryColumns)
Parameter Description
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
dtTable | True | expression | objDatatable | The data table to be filtered |
aryColumns | True | expression | [] | This array will be used to replace the old names of the data column |
Demo
aryData = [["a", 1], ["b", 2], ["c", 3], ["d", 1]]
aryColumns = ["letter", "number"]
objDatatable = Datatable.BuildDataTable(aryData,aryColumns)
Datatable.ModfiyColumns(objDatatable,["l", "n"])
TracePrint(objDatatable)
/*
l n
0 a 1
1 b 2
2 c 3
3 d 1
*/