Synthoid / ExportSheetData

Add-on for Google Sheets that allows sheets to be exported as JSON or XML.
MIT License
236 stars 46 forks source link

hide sheet_tab title in generated .json #102

Closed flutter-painter closed 4 years ago

flutter-painter commented 4 years ago

Hi @Synthoid, Happy new year, and thank you again for this life saving repo ! Do you know if there is a way to remove the spreadhseet title ? ESD automatically generate below code on top of the file :

{
  "spreadhsheet_tab_title":
...
}

So far I remove it manually, Would be a useful to spread the tool to colleagues allergic to text editors.

Synthoid commented 4 years ago

Haha, that's a surprisingly common allergy. Are wanting something like sheet unwrapping?

flutter-painter commented 4 years ago

Exactly, but it is not single row sheets.

Synthoid commented 4 years ago

I can add that. Probably just make the Unwrap Prefix work with multiple rows but keep the Unwrap Single Row Sheets option the same functionally.

Synthoid commented 4 years ago

I forgot to mention this, but if you are only exporting a single sheet, you can achieve this by setting Export Sheet(s) to Current sheet only.

flutter-painter commented 4 years ago

Yes I was using Current sheet onlyfailed to get the Unwrap single row effect though, Did you change something past few days ?

Synthoid commented 4 years ago

My schedule has prevented me from working in ESD for the past few weeks, so I haven’t touched the code since the last update. Is it working for you now?

flutter-painter commented 4 years ago

Sorry no difference, I am supposed to write something in the cell below wrap ? US_

Synthoid commented 4 years ago

You can get rid of the US_ prefix when exporting just the current sheet. I wonder if having both options set will actually interfere with the unwrapping process? I'll take a look and see what I can find!

flutter-painter commented 4 years ago

I'm sorry I haven't a clue, By the way, we are using ESD as a model to send spreadsheet data to mongodb, Would you find it interesting to adapt this app script into ESD for other mongo users ? If so where would you prefer pm ?

Synthoid commented 4 years ago

I've been eyeing MongoDB support for a while now actually. Feel free to PM me if you want to discuss in detail.

Synthoid commented 4 years ago

This has been added as of v59. That update should be going live later today.

flutter-painter commented 4 years ago

Thank you for staying on top of this. I gave it a try, not sure I am doing it correctly (screenshot below) Capture d’écran 2020-01-29 à 14 36 52

Synthoid commented 4 years ago

Unwrap sheet prefix is a prefix to the name of the sheet tab. By default, this prefix is set to US_ so if you wanted to unwrap a sheet named:

Sheet1

You would change its name to:

US_Sheet1

This will cause the sheet to be unwrapped and its elements placed in the root JSON object.

flutter-painter commented 4 years ago

Sorry to be so finicky but it is not working on my side.

Capture d’écran 2020-01-30 à 09 57 39

Capture d’écran 2020-01-30 à 09 58 10

Synthoid commented 4 years ago

You want the Unwrap sheet prefix to be set to US_ and the sheet name to be US_Sheet1 that should export your data properly.

flutter-painter commented 4 years ago

\°/

flutter-painter commented 4 years ago

Hey @Synthoid ! Hope you're ok, Sorry to rekindle this, but would it be possible when extracting to keep the arrays brackets on top and bottom ? [ ]

So that user have "nothing" to do but click. Thanks again for support