From 9abcba453396ac9b6169e6e34602a03530165542 Mon Sep 17 00:00:00 2001 From: TTL <1050636648@qq.com> Date: Thu, 23 Nov 2017 12:49:28 +0800 Subject: [PATCH] replace demo's to_json funtion [fix #896] https://github.com/SheetJS/js-xlsx/issues/896 add {herder:1} to "to_json" function --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 9fe5010..c95a841 100644 --- a/index.html +++ b/index.html @@ -78,7 +78,7 @@ var process_wb = (function() { var to_json = function to_json(workbook) { var result = {}; workbook.SheetNames.forEach(function(sheetName) { - var roa = X.utils.sheet_to_json(workbook.Sheets[sheetName]); + var roa = X.utils.sheet_to_json(workbook.Sheets[sheetName], {header:1}); if(roa.length) result[sheetName] = roa; }); return JSON.stringify(result, 2, 2);