Skip to main content

Create-Datatable

Command Description

Create Datatable

Command Prototype

objDatatable = Datatable.BuildDataTable(aryData,aryColumns)

Parameter Description

ParameterRequiredTypeDefaultDescription
aryDataTrueexpression[]It is usually a two-dimensional array that is read from Excel or retrieved using Data Scraping being used to modify the data in a data table
aryColumnsTrueexpression[]Column headers of a datatable

return

objDatatable,The variable used to save the output of the command.

Demo

aryData = [["a", 1], ["b", 2], ["c", 3]] 
aryColumns = ["letter", "number"]
objDatatable = Datatable.BuildDataTable(aryData,aryColumns)
TracePrint(objDatatable)
/*
letter number
0 a 1
1 b 2
2 c 3
*/