2.1.0 • Published 6 years ago

component-google-sheets v2.1.0

Weekly downloads
41
License
-
Repository
-
Last release
6 years ago

component-google-sheets

Read/write to google sheets

Populate sheets.config.json in the root of your project

  • sheetId: The id of the sheet to work with.
  • scriptId: The id of the script added to the sheet. A sample of the script is in the root of this repo.
  • domain: The domain of the google account, i.e. ckcreates.com.

Create a sheet on Google Sheets

  • The first row must be headers.
  • Go to file->publish to the web, select entire document and click publish.

Add the app script

  • Copy the contents of Google-sheets-app-script.js in the root of the repo.
  • On Google sheets, go to Tools->Script editor, paste and save.
  • Go to Publish->Deploy as web app.
  • Under "Who has access to the app", select "Anyone, even anonymous".
  • Click Deploy.

googleSheetsService

  • worksheets - an object of worksheets in the sheet, with id and title properties.
  • read(worksheet, query)
    • Optional worksheet id argument, defaults to the first worksheet.
    • Optional query object. {"Key to search": { "operator, i.e. > or like": "value"}}
  • create(data, worksheet)
    • data - an array of row objects - {header: value, header: value}, .... Headers will be appended to sheet if they don't already exist.
    • Optional worksheet id argument, defaults to the first worksheet.
2.1.0

6 years ago

2.0.6

7 years ago

2.0.5

7 years ago

2.0.4

7 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago