Skip to main content
Version: v6.5.0

Write to cell

Command Description

Write data to the specified cells in the data table

Command Prototype

Datatable.WriteCell(dtTable, cell, data)

Command parameter

parametermandatorytypedefault valueInstructions
dtTableTrueexpressionobjDatatableThe data table object being written, usually the return value of the "Build Data Table" command or the "Build Data Table from Excel Table" command
cellTrueexpression[1, 1]Specify the cells of the data table in a row column array format ([row number, column number]), such as [2,3], which represents the cell at the intersection of the second row and the third column
dataTruestring""Fill the data into the cell. Support writing and converting data of string, numeric, boolean, array, dictionary, and null types

Return result

Run instance

/*********************************Write Cell***************************************
Command Prototype:
Datatable.WriteCell(dtTable, cell, data)
Input Parameters:
dtTable -- Data table object. Note: The data table object to be written to, typically the return value of the "Build Data Table" command or the "Build Data Table from Excel" command.
cell -- Cell. Note: Specifies the cell in the data table, in row-column array format ([row number, column number]). For example, [2,3] represents the cell at the intersection of the 2nd row and 3rd column.
data -- Data. Note: The data to be filled into the cell. Supports writing data of string, numeric, boolean, array, dictionary, and null types after conversion.
Output Parameters:
None
Notes:
None
********************************************************************************/
Datatable.WriteCell(objDatatable, [1, 1], "")