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

Questions about Unwrap single row sheets setting #76

Open narschang01 opened 5 years ago

narschang01 commented 5 years ago

Hello,

Thank you for the great work making this nice add-on available, and thank you for the time spending on understanding and solving problems for the user.

I read the discussion in Unwrap single row sheets no longer works... ##68 about the unwrap single row sheet, and I still have questions... (sorry for that!!)

First, I read the documentation about unwrap single row sheet function. In the documentation, it gives an output example like this:

Unwrapped Output

JSON:

{ "Name":"Cid", "Age":25, "Role":"Fighter" }

But when I used the add-on to generate json output - unwrap single row sheet is checked, it doesn't give me the format like what showed in the example above. Instead, it gives me an output like this:

{ "achilles": { "Name": "achilles", "Appliance type": "CDS", "Date": "2018-07-01T04:00:00.000Z", "Version": "8.1.0.1638", "Uptime (days)": 20, }

So, my questions here are:

  1. In the setting, when I check unwrap single row sheet, what output should I expect to get?
  2. In Unwrap single row sheets no longer works... #68 , it was mentioned that:

The problem with unwrapping all single row sheets is that there could be situations where a sheet is supposed to be an array, but it only contains one element (meaning only one row). I couldn't assume that sheet should be collapsed instead of being exported as an array, so the new workflow had to be introduced. It's not as convenient, granted, but it is more flexible which is what I am going for.

If it is by design that the unwrap single row sheet doesn't generate the result as provided in the example, why do we keep this option available in the setting? Why don't take it away to avoid further confusion?

I wish I could attach screenshots to this discussion to better explain myself. Please let me know if I confuse you or if any further information is required to get my questions clear.

Thanks again!!

Regards, Nars

Synthoid commented 5 years ago

What settings do you have enabled when exporting your data?

narschang01 commented 5 years ago

Hi Chris,

Thanks for the quick response. There is a screenshot of the setting and output for your reference. Did I do som thing wrong or did I have a wrong expectation? Thank you.

[image: Screen Shot 2018-10-25 at 2.59.58 PM.png]

Nars

On Thu, Oct 25, 2018 at 4:43 PM Chris notifications@github.com wrote:

What settings do you have enabled when exporting your data?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Synthoid/ExportSheetData/issues/76#issuecomment-433198754, or mute the thread https://github.com/notifications/unsubscribe-auth/AhTti7iXnayd-GAmzyXRd1SBr0CGpLB_ks5uoiJpgaJpZM4X6-W3 .

Synthoid commented 5 years ago

Can you post that image on GitHub directly please? It seems that it didn't link properly so I just see:

[image: Screen Shot 2018-10-25 at 2.59.58 PM.png]

narschang01 commented 5 years ago

Here is the screenshot. Thansk.

screen shot 2018-10-25 at 2 59 58 pm

Synthoid commented 5 years ago

And over a month later, I finally respond. Sorry for the lack of responsiveness. Unwrap single row sheet will only unwrap sheets with a single row of data (not counting keys). I think what you want to do is export this sheet as an array. That should format your row data the way you are wanting.