Read data column
Command Description
Read single or multiple columns of data from a data table and return a new data table
Command Prototype
newObjDatatable=Datatable.ReadColumns(dtTable, columns)
Command parameter
parameter | mandatory | type | default value | Instructions |
---|---|---|---|---|
dtTable | True | expression | objDatatable | The read data table object, usually the return value of the "Build Data Table" command or the "Build Data Table from Excel Table" command |
columns | True | expression | [1, 1] | The data column that needs to be read. Only supports array formats (starting column number, ending column number), such as [2,5], which represents reading column data from column 2 to column 5, with sequence numbers starting from 1 |
Return result
NewObjDatatable, Assign the result of running the command to this variable.
Run instance
/*********************************Read Data Columns***************************************
Command Prototype:
newObjDatatable = Datatable.ReadColumns(dtTable, columns)
Input Parameters:
dtTable -- Data table object. Note: The data table object to be read, typically the return value of the "Build Data Table" command or the "Build Data Table from Excel" command.
columns -- Column numbers. Note: The data columns to be read. Only supports array format ([start column number, end column number]), e.g., [2,5] represents reading column data from the 2nd column to the 5th column. The index starts from 1.
Output Parameter:
newObjDatatable -- The variable where the output of the function call will be saved.
Notes:
None
********************************************************************************/
Dim newObjDatatable = ""
newObjDatatable=Datatable.ReadColumns(objDatatable, [1, 1])
TracePrint(newObjDatatable)