Skip to main content
Version: v6.5.0

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

parametermandatorytypedefault valueInstructions
dtTableTrueexpressionobjDatatableThe read data table object, usually the return value of the "Build Data Table" command or the "Build Data Table from Excel Table" command
columnsTrueexpression[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)