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

JSON - Arrays of objects made from sheet rows #74

Closed Sneezembop closed 5 years ago

Sneezembop commented 5 years ago

Having a hard time getting my sheet to export. Granted I'm using a bunch of the advanced features. I have each row as an object that has three properites and two sets of nested arrays of properties.

{ Name: XXX, Prop1: XXX, Prop2: XXX, Array1: [ 1,2,3], Array2: [1,2,3] }

It will export one (row) of these but wont export the whole sheet as an array of these objects. Every time I use the Export Contents as Array or Export Sheet Arrays option, I just get a blank array with no content.

[]

Am I doing something wrong? image

Synthoid commented 5 years ago

The most common thing that causes this issue is the column keys not being properly formatted to support both arrays and nested elements. (which looks like the case from your screenshot) The Nested array prefix option should handle this automatically for you. See the wiki section on Exporting Nested Elements and Sheet Arrays at the Same Time for some more detailed information.

Sneezembop commented 5 years ago

Thank you so much! That totally fixed the issue.