json2csv writes all data in single columns
See original GitHub issueI am using below method, to convert json data into CSV, problem I am facing is it writes all columns in single column. This causes formatting issues. I want to write each column in separate excel column.
csv = json2csv(jsonData, { fields});
Issue Analytics
- State:
- Created 4 years ago
- Comments:12
Top Results From Across the Web
when convert to json2csv all headers and datas coming same ...
I use the json2csv module to convert the data I have to the csv extension and send it by mail, but all the...
Read more >json2csv - Mirco Zeiss
json2csv. Converts json into csv with column titles and proper line endings. Can be used as a module and from the command line....
Read more >json2csv - npm
json2csv. Converts json into csv with column titles and proper line endings. Can be used as a module and from the command line....
Read more >Convert multiple JSON files to CSV Python - GeeksforGeeks
Example 1: If all columns match. In this example, we will load two json files, concatenate one to another ... Convert JSON to...
Read more >Pandas Write DataFrame to CSV - Spark by {Examples}
DataFrame.to_csv() method you can write/save/export a pandas DataFrame to CSV File ... Column Names While Writing; Handling Missing Values (None/NaN); Write ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I found the issue, the encoding for the excel should be “Big endian”, in notepad ++ when I change encoding to UCS-2 LE BOM, it works properly.
Could just give me some data to see what does
excelJson
looks like? Is it an array of arrays? An array of objects? Something else?Also two notes:
csv = json2csv(excelJson, { fields });
csv = json2csv(excelJson);