@itsravenous/google-sheets-public
v2.0.0
Published
Zero-dependency module to fetch data from a public Google Sheet
Downloads
8
Maintainers
Readme
@itsravenous/google-sheets-public
Simple, zero-dependency package for fetching data from public Google sheets.
Installation
npm i @itsravenous/google-sheets-public
Setting up a public Google sheet
- Create an account at https://developers.google.com/
- Go to your Google Developer Console dashboard and click "Enable APIs and Services". Select Google Sheets.
- Go to the Credentials section of your account and create an API key. Note it down.
- Create a Google sheet and note down its ID (from the URL -
https://docs.google.com/spreadsheets/d/THIS-PART-IS-THE-ID/edit#gid=0
)
Usage
const { fetchSheet } = require('@itsravenous/google-sheets-public');
fetchSheet({ sheetId: 'your-sheet-id', tabName: 'Sheet 1', apiKey: 'your-api-key', callback: (error, values) => console.log(values) });