You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2
+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3
+
4
+
name: CI
5
+
6
+
on:
7
+
push:
8
+
branches: ["main"]
9
+
pull_request:
10
+
branches: ["main"]
11
+
12
+
jobs:
13
+
ci:
14
+
runs-on: ubuntu-latest
15
+
16
+
# strategy:
17
+
# matrix:
18
+
# node-version: [20.x] # [14.x, 16.x, 18.x]
19
+
# # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
20
+
21
+
steps:
22
+
- name: Checkout
23
+
uses: actions/checkout@v4
24
+
25
+
- name: Install Node.js
26
+
uses: actions/setup-node@v4
27
+
with:
28
+
node-version: 20.x
29
+
30
+
- uses: pnpm/action-setup@v4
31
+
name: Install pnpm
32
+
with:
33
+
version: 8
34
+
run_install: false
35
+
36
+
- name: Get pnpm store directory
37
+
shell: bash
38
+
run: |
39
+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
@@ -20,37 +21,35 @@ _Welcome to the docs site for_
20
21
**Docs site -**
21
22
Full docs available at [https://theoephraim.github.io/node-google-spreadsheet](https://theoephraim.github.io/node-google-spreadsheet)
22
23
23
-
-------------
24
+
---
24
25
25
26
> 🌈 **Installation** - `pnpm i google-spreadsheet`<br/>(or `npm i google-spreadsheet --save` or `yarn add google-spreadsheet`)
26
27
27
28
## Examples
29
+
28
30
_The following examples are meant to give you an idea of just some of the things you can do_
29
31
30
-
> **IMPORTANT NOTE** - To keep the examples concise, I'm calling await [at the top level](https://v8.dev/features/top-level-await) which is not allowed by default in most versions of node. If you need to call await in a script at the root level, you must instead wrap it in an async function like so:
32
+
> **IMPORTANT NOTE** - To keep the examples concise, I'm calling await [at the top level](https://v8.dev/features/top-level-await) which is not allowed in some older versions of node. If you need to call await in a script at the root level and your environment does not support it, you must instead wrap it in an async function like so:
@@ -91,7 +91,7 @@ const rows = await sheet.getRows(); // can pass in { limit, offset }
91
91
92
92
// read/write row values
93
93
console.log(rows[0].get('name')); // 'Larry Page'
94
-
rows[1].set('email') ='sergey@abc.xyz'; // update a value
94
+
rows[1].set('email', 'sergey@abc.xyz'); // update a value
95
95
rows[2].assign({ name:'Sundar Pichai', email:'sundar@google.com' }); // set multiple values
96
96
await rows[2].save(); // save updates on a row
97
97
await rows[2].delete(); // delete a row
@@ -112,12 +112,12 @@ userRows[0].get('badColumn'); // <- will throw a type error
112
112
```
113
113
114
114
More info:
115
+
115
116
-[GoogleSpreadsheetWorksheet > Working With Rows](https://theoephraim.github.io/node-google-spreadsheet/#/classes/google-spreadsheet-worksheet#working-with-rows)
awaitsheet.saveUpdatedCells(); // save all updates in one call
136
136
```
137
+
137
138
More info:
139
+
138
140
-[GoogleSpreadsheetWorksheet > Working With Cells](https://theoephraim.github.io/node-google-spreadsheet/#/classes/google-spreadsheet-worksheet#working-with-cells)
> **This module provides an intuitive wrapper around Google's API to simplify common interactions**
169
171
170
172
While Google's v4 sheets API is much easier to use than v3 was, the official [googleapis npm module](https://www.npmjs.com/package/googleapis) is a giant autogenerated meta-tool that handles _every Google product_. The module and the API itself are awkward and the docs are pretty terrible, at least to get started.
@@ -173,7 +175,6 @@ While Google's v4 sheets API is much easier to use than v3 was, the official [go
173
175
This module makes trade-offs for simplicity of the interface.
174
176
Google's API provides a mechanism to make many requests in parallel, so if speed and efficiency are extremely important to your use case, you may want to use their API directly. There are also many lesser-used features of their API that are not implemented here yet.
175
177
176
-
177
178
## Support & Contributions
178
179
179
180
This module was written and is actively maintained by [Theo Ephraim](https://theoephraim.com).
@@ -193,4 +194,5 @@ The docs site is generated using [docsify](https://docsify.js.org). To preview a
193
194
The content lives in markdown files in the docs folder.
194
195
195
196
## License
197
+
196
198
This is free and unencumbered public domain software. For more info, see https://unlicense.org.
0 commit comments