Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(General) Collapse single row sheets option #52

Closed
Synthoid opened this issue Feb 8, 2018 · 3 comments
Closed

(General) Collapse single row sheets option #52

Synthoid opened this issue Feb 8, 2018 · 3 comments
Assignees

Comments

@Synthoid
Copy link
Owner

Synthoid commented Feb 8, 2018

Add an option to collapse single row sheets.

Unlike unwrapping sheets, where the data from the only row in a sheet is placed into the root of the main JSON blob, this option unwraps the row's JSON so it is in the sheet's JSON content. For example:

Sheet Name: Test

Input:
Field1 | Field2 | Field3
Lupin | false | 0.75

Default Output:
{
--"Test": {
----"Lupin": {
------"Field1":"Lupin",
------"Field2":false,
------"Field3":0.75
----}
--}
}

Unwrapped Output:
{
--"Field1":"Lupin",
--"Field2":false,
--"Field3":0.75
}

Collapsed Output:
{
--"Test": {
----"Field1":"Lupin",
----"Field2":false,
----"Field3":0.75
--}
}

@Synthoid Synthoid self-assigned this Feb 8, 2018
@Synthoid
Copy link
Owner Author

Shipped in v44 for JSON. XML support will require nested element implementation.

@mherbold
Copy link

mherbold commented Aug 1, 2018

This is not working for me - my single row sheet still gets exported as an array with this feature turned on. This used to be what "Unwrap single row sheets" did in an older version (convert to object instead of array) and it worked beautifully then. In the latest version it does not work any more. I reported this as an issue here along with a link to my sheet.

@Synthoid
Copy link
Owner Author

Synthoid commented Dec 3, 2018

Pushing the v50 update later today that will have XML support for this.

@Synthoid Synthoid closed this as completed Dec 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants