bassarisse / google-spreadsheet-to-json

Simple tool to export Google Spreadsheets to JSON files, though Node API or CLI
The Unlicense
134 stars 33 forks source link

* added worksheet title when processing multi tab sheet #12

Open Ralqawareet opened 7 years ago

Ralqawareet commented 7 years ago

hi , i was working on reading and converting google sheets data into json and came across your repo , it was really helpful thank you for your time and effort . one thing i noticed when asking for multi tab worksheet is that i get one big array of all "tab sheets" combined together and in case if you have a lot of tabs inside your sheet things might get messy , so i thought it would be nice to separate them all out in the final json where the output will something like this { tabTitle1 : [jsonCells] , tabTitle1 : [jsonCells] }

bassarisse commented 7 years ago

Hi there, thanks for the PR!

As you can see from the failing tests, this would break our API, so we would have to release a new major version, but maybe we can resolve this by adding a new option. However, when this option is used, I think the object returned should be something like this:

{
  "title": "Worksheet 1",
  "index": 0,
  "data": (...)
}

So we'll receive an array of objects like this one.

What do you think?

Ralqawareet commented 7 years ago

yeah sorry i should have paid more attention to the changes i've made and did the test's , but i hadn't enough time and had a bit of difficulties into running the test's ! but yeah that would be really nice and much appreciated if there will an option to pass where the output will in similar what you've mentioned .

bassarisse commented 7 years ago

No worries! I'll address this when I have some time. In the meantime, feel free to update this PR or to create a new one.