Skip to main content
Version: v6.5.0

Read data rows

Command Description

Read single or multiple rows of data from a data table and return a new data table

Command Prototype

newObjDatatable = Datatable.ReadRows(dtTable, rows)

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
rowsTrueexpression[1, 1]The data rows that need to be read. Only supports array format (starting line number, ending line number), such as [1,3], which represents reading row data from line 1 to line 3, with sequence numbers starting from 1

Return result

NewObjDatatable, Assign the result of running the command to this variable.

Run instance

/*********************************Read Data Rows***************************************
Command Prototype:
newObjDatatable = Datatable.ReadRows(dtTable, rows)
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.
rows -- Row numbers. Note: The data rows to be read. Only supports array format ([start row number, end row number]), e.g., [1,3] represents reading row data from the 1st row to the 3rd row. 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.ReadRows(objDatatable, [1, 1])
TracePrint(newObjDatatable)