Synthoid / ExportSheetData

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

Improper closure of last element if next columns are to be ignored. #23

Closed DavidFickes closed 6 years ago

DavidFickes commented 7 years ago

If you have a sheet in which the last element that you want to include in the .json is followed by "ignored" columns, the export appends a comma at the last element before the closing brace. Seems to be an issue of not checking to make sure there is another active column to be included ...

Not a big deal but most of my sheets will use the far right for index columns if needed. The quick fix is to put a live column on the far right but this is not ideal.

Current:

{ "NEW01" : { "TestRecord" : "MAJ WI NEW01", "NumberOfInverters" : "1", }, "NEW02" : { ... and so forth ....

Ideal:

{ "NEW01" : { "TestRecord" : "MAJ WI NEW01", "NumberOfInverters" : "1" }, "NEW02" : { ... and so forth ....

Synthoid commented 7 years ago

I just pushed a new version that should address this issue. Thanks for pointing it out!

Synthoid commented 7 years ago

Just tested a little more, and the current check will still append a trailing comma if multiple columns are ignored at the end of a row.

Synthoid commented 6 years ago

This is now fixed as of V40.