parse-googlesheets
TypeScript icon, indicating that this package has built-in type declarations

3.0.5 • Public • Published

This is library for parse google sheets

example

import { parseGoogleSheets, number, string } from 'parse-googlesheets';

const schema = {
    dataProperty1: {
        parse: string,
        columnName: 'Column name 1'
    },
    dataProperty2: {
        parse: number,
        columnName: 'Column name 2'
    }
};

const myData = parseGoogleSheets(schema, googlesheets);

Where googlesheets - data from REST API from google sheets.

This example for sheets like this:

Column name 1 Column name 2
some 1
string 2
field 3

Output of JSON.stringify(myData)

[
  {
    "dataProperty1": "some",
    "dataProperty2": 1
  },
  {
    "dataProperty1": "string",
    "dataProperty2": 2
  },
  {
    "dataProperty1": "field",
    "dataProperty2": 3
  }
]

Readme

Keywords

Package Sidebar

Install

npm i parse-googlesheets

Weekly Downloads

3

Version

3.0.5

License

ISC

Unpacked Size

50.1 kB

Total Files

11

Last publish

Collaborators

  • tsigel