Google Sheets and JavaScript with Node.js
Why Stack Overflow recommends it
Stack Overflow users cite it as the tutorial they were following when they hit errors using the google-spreadsheet library with Node.js and Google Sheets.
Recommended by 1 people across 1 different months, 2020 to 2022.
What it is
A short Twilio developer tutorial showing how to read data from a Google Sheet in a Node.js app using the google-spreadsheet module by Theo Ephraim. It walks through connecting to an example spreadsheet with service account credentials.
What people said
Recommends Tiago Ferrero · 2020-03 · Stack Overflow · on “Node.js when trying to access Google Spreadsheets”
I'm trying to get a Discord bot to access a Google Spreadsheet, but this error keeps appearing and I can't work around it, I'm following this video ( [this video] ) and did everything up until the point where the program is ran. Any ideas how to solve this? Thank you in advance. UnhandledPromiseRejectionWarning: TypeError: Cannot set property 'jwtClient' of undefined at useServiceAccountAuth (Z:\GitHub\discordBot\node_modules\google-spreadsheet\lib\GoogleSpreadsheet.js:60:20) at internal/util.js:297:30 at new Promise (<anonymous>) at useServiceAccountAuth (internal/util.js:296:12) at accessSpreadsheet (Z:\GitHub\discordBot\sheets\sheets.js:8:45) at Object.module.exports.run (Z:\GitHub\discordBot\
Cites FGuindon · 2020-02 · Stack Overflow · on “"Cannot set property 'jwtClient' of undefined" Trying to use Node.js with Google Sheets”
I've been following this tutorial : [this video] I had to stop at 3:43 because of this problem : Here is the main JS File to get into the Google Spreadsheet : const GoogleSpreadsheet = require('google-spreadsheet'); const { promisify } = require('util'); const { google } = require('googleapis'); const creds = require('./client_secret'); async function accessSpreadsheet() { const doc = new GoogleSpreadsheet.GoogleSpreadsheet('1i1uSTZ5GkMJFqUGpxsvCOIOZJ6POPOuS9Vu0kDP1y_w'); await promisify(doc.useServiceAccountAuth)(creds); const info = await promisify(doc.getInfo)(); const sheet = info.worksheets[0]; console.log(`TItle : ${sheet.title}, Rows: ${sheet.rowCount}`); } accessSpreadsheet(); When I exec
Cites Tallion 22 · 2022-07 · Stack Overflow · on “Error: Can't resolve 'child_process' and Error: Can't resolve 'fs'”
I am trying to use the google-spreadsheet library to get data from google spreadsheets to my Vue application. But I am getting the following error error in ./node_modules/google-auth-library/build/src/auth/googleauth.js Module not found: Error: Can't resolve 'child_process' in 'C:\Users\user\Desktop\Internship\Draft1\draft1\node_modules\google-auth-library\build\src\auth' error in ./node_modules/google-auth-library/build/src/auth/googleauth.js Module not found: Error: Can't resolve 'fs' in 'C:\Users\user\Desktop\Internship\Draft1\draft1\node_modules\google-auth-library\build\src\auth' error in ./node_modules/google-p12-pem/build/src/index.js Module not found: Error: Can't resolve 'fs' in 'C: