# @ddazal/gsheetreader

> From Google Sheets to JSON

Latest version **2.2.0** (published 2020-11-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ddazal/gsheetreader
pnpm add @ddazal/gsheetreader
yarn add @ddazal/gsheetreader
bun add @ddazal/gsheetreader
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.2.0 |
| Published | 2020-11-25 |
| First published | 2020-11-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 18.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | David Daza |
| Maintainers | ddazal |

## Links

- npm: https://www.npmjs.com/package/@ddazal/gsheetreader
- Repository: https://github.com/datasketch/gsheetreader
- Homepage: https://github.com/datasketch/gsheetreader#readme
- Issues: https://github.com/datasketch/gsheetreader/issues
- npm.io page: https://npm.io/package/@ddazal/gsheetreader

## Dependencies (1)

- [isomorphic-fetch](https://npm.io/package/isomorphic-fetch.md) ^3.0.0

## Recent versions

- 2.2.0 (latest) — 2020-11-25
- 2.1.1 — 2020-11-25
- 2.1.0 — 2020-11-18
- 2.0.1 — 2020-11-13
- 2.0.0 — 2020-11-13

## README

# gsheetreader

Transform a public Google Spreadsheet to JSON

## Install

From npm:

```sh
npm install @ddazal/gsheetreader
```

As a script tag:
```html
<script src="https://cdn.jsdelivr.net/gh/datasketch/gsheetreader@2/dist/gsheetreader.umd.js"></script>
```

## Usage

```js
const id = 'some-google-sheet-public-id';
const gsr = new GSheetReader();
gsr.getJSON(id).then(console.log);
```

Alternatively, the function can receive a number as a second parameter to indicate the sheet that will be read. This second parameter defaults to `1`.

```js
// This will read the data from the third sheet
const id = 'some-google-sheet-public-id';
const gsr = new GSheetReader();
gsr.getJSON(id, 3).then(console.log);
```

The `getJSON` function returns an object with properties `data`, `headers` and `size`.

## Roadmap

- [x] Publish to npm registry
- [ ] Read multiples sheets within the same spreadsheet

---
_Source: https://npm.io/package/@ddazal/gsheetreader · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
