Receiving Google sheet values

I wanted to get values from Google Sheet, but that was easier said than done. I tried all tips and tricks I could find with no luck. I finally found a solution (that worked for me). I downloaded csv values and used a module to stuff them in a table.

I used this module (not created by me):

https://github.com/FourierTransformer/ftcsv

And got it working using this code:

-- Link to Google sheet local URL = "https://docs.google.com/spreadsheets/d/e/YOUR\_SHEET\_ID/pub?output=csv" local ftcsv = require('ftcsv') local function loginCallback(event) -- perform basic error handling if ( event.isError ) then print( "Network error!") else local csvFile = event.response local csvData, headers = ftcsv.parse(csvFile, ",", {loadFromString=true, headers=true}) for u,k in pairs(csvData) do print("Number = " .. u) for i,l in pairs(k) do print( i .. " : " .. l) end end end return true end network.request( URL, "GET", loginCallback )