Get-Table-Area
Command Description
Get the area information from the table object and return a two-dimensional array
Command Prototype
arrayRet = Mage.ExtractTableRegion(objTableData, start_row,start_col,end_row,end_col)
Parameter Description
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
objTableData | True | expression | objTableData | Use the "Get Specified Table" command to output variable or the "Get All Tables" command to specify the variable of the table index (for example: arrayRet[1], which means the table index is 2) |
start_row | True | number | 1 | Specify the start row number of the table object (starting from 1) |
start_col | True | number | 1 | Specify the start column number of the table object (starting from 1) |
end_row | True | number | 2 | Specify the end row number of the table object (starting from 1) |
end_col | True | number | 2 | Specify the starting stop column number of the table object (starting from 1) |
return
arrayRet,The variable used to save the output of the command.
Demo
Dim objTableData='' // Table object, use the variable output by the "Get Specified Table" command or the variable of the table index specified by the "Get All Tables" command (for example: arrayRet[1], indicating that the table index is 2 form)
TracePrint "--------------------Get table area--------------------"
// --------------------------------------------------------
// [Remarks] Get the table area
// Input parameter 1:
// objTableData--table object
// Input parameter 2:
// start_row--start row number
// Input parameter 3:
// start_col--start column number
// Input parameter 4:
// end_row--end row number
// Input parameter 5:
// end_col--end column number
// Output parameters:
// arrayRet: The variable to which the output of the function call is saved
// Command Prototype:arrayRet = Mage.ExtractTableRegion(objTableData, start_row,start_col,end_row,end_col)
// --------------------------------------------------------
arrayRet = Mage.ExtractTableRegion(objTableData, 1,1,2,2)
TracePrint(arrayRet)