Skip to main content

Google Sheets with NodeJS

Installation

npm install googleapis

Hello World example

  • Get Speadsheet ID from the browser url of the sheet
const { google } = require('googleapis');

const SCOPES = ['https://www.gooogleapis.com/auth/spreadsheets'];

const sheet = google.sheets({
version,
auth
});

await sheets.spreadsheets.values.update({
speadsheetId,
range: 'A1',
resource: {
values: [['Hello World!']]
},
});

Links