data.printCell
Description
Print a cell string value from within a 2D array (grid) returned from data.loadCsvFile or data.runSelectQuery etc.

Parameters
grid 2D array (in format cells[yRow][xCol])
xCol integer (one-based X/column index)
yRow integer (one-based Y/row index)

Return value
cellValue string

Example
-- get location names from Stock Tracker database
local cells = data.runSelectQuery("SELECT [LocationName] from [ItemLocations]")

-- print the first 3 location names
data.printCell(cells, 0,0)
data.printCell(cells, 0,1)
data.printCell(cells, 0,2)

Comments
For convenience this function also returns the cell value in the same way as data.getCell.

See also
data.setCell
data.getCell

Back