replace demo's to_json funtion [fix #896]

https://github.com/SheetJS/js-xlsx/issues/896
add {herder:1} to  "to_json" function
This commit is contained in:
TTL 2017-11-23 12:49:28 +08:00 committed by GitHub
parent f707c35b45
commit 9abcba4533
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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);