Thanks to : Retrosheet by theApache64
npm i retrosheet-ts
Get Spreadsheet ID from spreadsheet url.
import { fetchRetrosheetData } from 'retrosheet-ts';
const response = await fetchRetrosheetData("<Spreadsheet ID>", { sheetName: "notess", query: "select * limit 2" })
Output
[
{
"created_at": "26/08/2023 17:37:06",
"title": "Hello",
"description": "Description"
},
{
"created_at": "26/08/2023 17:37:28",
"title": "Yogesh",
"description": "Description"
}
]
Follow steps 1 - 4 from here
import { writeRetrosheetData } from 'retrosheet-ts';
const request = {
'Title': "test title",
'Description': 'test Description'
}
writeRetrosheetData("<FORM_ID>", request)
Note: Keys of request must be the same as Form Field name.