Hello everyone, I was looking for how to get information from Google Sheets for a self-updating LocalizationTable
and decided to share it, information taken from this video:
How to use
- You create or open a file in Google Sheets.
- You press Share and in change you press Anyone with the link.
- Copy link, and you go to Roblox, remember to allow HTTPS requests.
- Download the module or get it by its asset id and in a
script
write the following:
local GoogleSheets = require(path.to.GoogleSheets) -- or require(7392092163)
local GST = GoogleSheets.new(Document, Page)
-- Document: id of the document. Page: id of the page
Get Document id and Page id
URL = "https://docs.google.com/spreadsheets/d/1nj6oilCFIXZAVvifsu7UrfLJ3yLiwVwx1FOZivGvUw4/edit#gid=163593929"
Document = "1nj6oilCFIXZAVvifsu7UrfLJ3yLiwVwx1FOZivGvUw4"
Page = "163593929"
- Call the methods!
About
Current methods
GetByCell
- Parameters:: Letter: string, Number: number
- Description: Obtains the content of the document by the cols(Letter) and its row(Number)
- Return: string?
- Example:
local GoogleSheets = require(7392092163)
local GST = GoogleSheets.new(Document, Page)
print(GST:GetByCell("A", 1)) -- hello
print(GST:GetByCell("B", 1)) -- nil
Update
- Parameters:: none
- Description: update module information
- Return: void or nothing
Thanks for reading.
Module, Source code