forked from sheetjs/sheetjs
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:
parent
f707c35b45
commit
9abcba4533
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user