Sheets API
Quick Start
- https://developers.google.com/sheets/api/quickstart/nodejs
- credentials.json
- get token.json
- Sample: https://github.com/kenu/oksheets
google spreadsheet Module
textnpm i google-spreadsheet --save
-
Create Google Service Account
- https://console.cloud.google.com/apis/credentials
- select
APIs & Services>Credentials(API 및 서비스>사용자 인증 정보) - Click blue
+ CREATE CREDENITALSand selectService accountoption - Enter name, description, click
CREATE - You can skip permissions, click
CONTINUE - Click
+ CREATE KEYbutton - Select the
JSONkey type option - Click
Createbutton - your JSON key file is generated and downloaded to your machine (it is the only copy!)
- click
DONE - note your service account’s email address (also available in the JSON key file)
-
Add Service Account email to SpreadSheets permission list
ref
- Reading & Writing Cell Values
- Writing to Google Sheets using Node JS
- npm google spreadsheet