data.loadCsvFile
Description
Load data from a CSV file to a Lua 2D array

Parameters
filename string

Return value
cells 2D array (in format cells[yRow][xCol])

Example
-- load cells from CSV
local cells = data.loadCsvFile(io.getSpecialFolderPath(CSIDL_MYDOCUMENTS) .. "test.csv")

if #cells < 1 then
    print "Load CSV failed"
else
    data.printGrid(cells)
end

Comments

See also
data.printGrid
ui.showGridViewerDialog

Back
Generated on the 26 June 2024 at 22:01:27 (UK Time)