Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ziyank/googlesheetstojson
An npm package to read Google Sheets data and convert it to JSON without publishing it to the web
https://github.com/ziyank/googlesheetstojson
googlesheets json npm-package
Last synced: 19 days ago
JSON representation
An npm package to read Google Sheets data and convert it to JSON without publishing it to the web
- Host: GitHub
- URL: https://github.com/ziyank/googlesheetstojson
- Owner: ZiyanK
- License: mit
- Created: 2021-02-15T11:47:01.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-02-15T14:04:16.000Z (almost 4 years ago)
- Last Synced: 2024-12-13T22:27:16.295Z (20 days ago)
- Topics: googlesheets, json, npm-package
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/googlesheetstojson
- Size: 48.8 KB
- Stars: 25
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# googlesheetstojson
![banner](assets/banner.png)
An npm package to read Google Sheets data and convert it to JSON without publishing it to the web. Simply change Share access to "Anyone with the link can View".
Give a ⭐ if you found this package interesting!
## Why is it different
It is not required to "Publish to Web" in order for this package to work. Simply change Share access and it is ready to go.
## Installation
```bash
$ npm install googlesheetstojson
```## Usage
```js
const { JSONFromURL, JSONFromSheetID } = require("googlesheetstojson");const URLexample = async (url) => {
data = await JSONFromURL(url);
console.log(data);
}const IDexample = async (id) => {
data = await JSONFromSheetID(id);
console.log(data);
}URLexample("https://docs.google.com/spreadsheets/d/13WicsCYCAI8SwP_g8n7hiwb4BAEBZ0cJDBfGqGuZBwU/edit#gid=0");
IDexample("13WicsCYCAI8SwP_g8n7hiwb4BAEBZ0cJDBfGqGuZBwU")
```## Contributions
- Feel Free to create a PR/Issue for any feature or bug(s).
- Make sure you follow the community guidelines!
- Have a feature request? Open an Issue!## License
This package is licensed under [MIT](https://github.com/ZiyanK/googlesheetstojson/blob/master/LICENSE)