How to store json with header as one column and corresponding values as another column. #949

Closed
opened 2018-01-09 06:03:35 +00:00 by kmahalingpur · 5 comments
kmahalingpur commented 2018-01-09 06:03:35 +00:00 (Migrated from github.com)

Hi im new to this xls. Im able to store data as specified in readmd. But my requirement is to store json key as one column and values as another column. How to achieve this?.
Thanks in advance :)

Hi im new to this xls. Im able to store data as specified in readmd. But my requirement is to store json key as one column and values as another column. How to achieve this?. Thanks in advance :)
reviewher commented 2018-01-11 06:54:56 +00:00 (Migrated from github.com)

Would a transpose of the json_to_sheet function (headers in column "A", first "data row" in column "B", etc) solve the problem?

Would a transpose of the `json_to_sheet` function (headers in column "A", first "data row" in column "B", etc) solve the problem?
kishoreaoe commented 2018-01-11 07:06:31 +00:00 (Migrated from github.com)

@reviewher , Could you please provide a demo or working link for converting JSON to SHEET .!

@reviewher , Could you please provide a demo or working link for converting JSON to SHEET .!
reviewher commented 2018-01-11 07:10:21 +00:00 (Migrated from github.com)

@kishoreaoe here's a jsfiddle: https://jsfiddle.net/uxnf00z8/4/ see https://github.com/SheetJS/js-xlsx/issues/817#issuecomment-331605640 for the original explanation.

@kishoreaoe here's a jsfiddle: https://jsfiddle.net/uxnf00z8/4/ see https://github.com/SheetJS/js-xlsx/issues/817#issuecomment-331605640 for the original explanation.
kishoreaoe commented 2018-01-11 08:58:57 +00:00 (Migrated from github.com)

@reviewher yeah, I have used above fiddle but while downloading am facing
"Unrecognized type array" Issue. Please help us in resolving this.

@reviewher yeah, I have used above fiddle but while downloading am facing "Unrecognized type array" Issue. Please help us in resolving this.
kishoreaoe commented 2018-01-11 10:18:16 +00:00 (Migrated from github.com)

@reviewher Issue Solved. Problem was js-xlsx is having older version. Corrected with new version and all went fine.!

@reviewher Issue Solved. Problem was js-xlsx is having older version. Corrected with new version and all went fine.!
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sheetjs/sheetjs#949
No description provided.