data.setCell
Set a cell string value within a 2D array (grid) returned from data.loadCsvFile or data.runSelectQuery etc.
grid 2D array (in format cells[yRow][xCol])
xCol integer (one-based X/column index)
yRow integer (one-based Y/row index)
value string
none
local cells = data.loadCsvFile(io.getSpecialFolderPath(CSIDL_MYDOCUMENTS) .. "test.csv")
data.setCell(cells, 2, 1, "Hello")
local value = data.getCell(cells, 2, 1)
print(value)
If the x,y values are outside of the range of the array then the array is resized automatically and padded with empty strings.
Generated on the 26 June 2024 at 22:01:28 (UK Time)