forked from sheetjs/sheetjs
x-spreadsheet skip blank ws
This commit is contained in:
parent
72af79c866
commit
6d651175e4
@ -15,6 +15,7 @@ function stox(wb) {
|
||||
wb.SheetNames.forEach(function (name) {
|
||||
var o = { name: name, rows: {} };
|
||||
var ws = wb.Sheets[name];
|
||||
if(!ws || !ws["!ref"]) return;
|
||||
var range = XLSX.utils.decode_range(ws['!ref']);
|
||||
// sheet_to_json will lost empty row and col at begin as default
|
||||
range.s = { r: 0, c: 0 };
|
||||
@ -91,8 +92,8 @@ function xtos(sdata) {
|
||||
if (!cellText) {
|
||||
cellText = "";
|
||||
type = "z";
|
||||
} else if (!isNaN(parseFloat(cellText))) {
|
||||
cellText = parseFloat(cellText);
|
||||
} else if (!isNaN(Number(cellText))) {
|
||||
cellText = Number(cellText);
|
||||
type = "n";
|
||||
} else if (cellText.toLowerCase() === "true" || cellText.toLowerCase() === "false") {
|
||||
cellText = Boolean(cellText);
|
||||
|
Loading…
Reference in New Issue
Block a user