我收到了一个JSON文件,但不知道如何阅读它.是否有转换器,我可以生成一个漂亮的CSV文件,以便它可以加载到MS Excel?我不懂JSON,所以如果有人编写脚本或将我链接到可以完成工作的脚本,那就太棒了.
我在http://json.bloople.net上发现了一些东西,不幸的是,它是HTML的JSON.
编辑:jsonformat.com更接近,但它仍然不是CSV.
我有Json数据,我需要使用javascript将json数据转换为Excel文件,
参考网址:http://jsfiddle.net/hybrid13i/JXrwM/
我正在使用此代码:
function JSONToTSVConvertor(JSONData, ReportTitle, ShowLabel, myTemplateName){
//If JSONData is not an object then JSON.parse will parse the JSON string in an Object
var arrData = typeof JSONData != 'object' ? JSON.parse(JSONData) : JSONData;
var TSV = '';
//Set Report title in first row or line
//TSV += ReportTitle + '\r\n\n';
//This condition will generate the Label/Header
if (ShowLabel) {
var row = "";
//This loop will extract the label from 1st index of on array …Run Code Online (Sandbox Code Playgroud)