Open DBWillis opened 3 months ago
I tried encoding a single column table, and it seems to work okay. The table does need to be in a specific format, so you might be running into issues there.
Here's the example I tried:
local users = {
{name="alice"},
{name="bob"},
{name="eve"}
}
print(ftcsv.encode(users, ","))
which prints out:
"name"
"alice"
"bob"
"eve"
Hopefully this helps a bit!
I am trying to table a lua table and encode it as a csv then write it to a csv file. my table is a simple table with only one column but I keep getting this error.
local fileOutput = ftcsv.encode(tagsOut,",") local file = assert(io.open(file),"w") file:write(fileOutput) file:close()
I get this error:
/usr/qsc/www/designs/NgwUmIDsUYkk/lua/ftcsv/init.lua:768: bad argument #1 to 'pairs' (table expected, got string)