diff --git a/bits/66_wscommon.js b/bits/66_wscommon.js index 4ccb178..5030781 100644 --- a/bits/66_wscommon.js +++ b/bits/66_wscommon.js @@ -13,7 +13,7 @@ function get_cell_style(styles, cell, opts) { if (cell.s && (cell.s == +cell.s)) { return cell.s} // if its already an integer index, let it be if (!cell.s) cell.s = {} - if (cell.z) cell.s.numFmtId = cell.z; + if (cell.z) cell.s.numFmt = cell.z; cell.s = style_builder.addStyle(cell.s); return cell.s; diff --git a/bits/92_stylebuilder.js b/bits/92_stylebuilder.js index 43a0906..ef1c75b 100644 --- a/bits/92_stylebuilder.js +++ b/bits/92_stylebuilder.js @@ -252,7 +252,8 @@ if ((typeof 'module' != 'undefined' && typeof require != 'undefined') || (typeo return numFmt; // we're matching an integer against some known code } - var $numFmt = XmlNode(numFmt) + + var $numFmt = XmlNode('numFmt') .attr('numFmtId', (++customNumFmtId)) .attr('formatCode', numFmt); @@ -261,7 +262,7 @@ if ((typeof 'module' != 'undefined' && typeof require != 'undefined') || (typeo var count = this.$numFmts.children().length; this.$numFmts.attr('count', count); - return customNumFmtId; + return customNumFmtId ; }, _addFill: function (attributes) { diff --git a/xlsx.js b/xlsx.js index 8680725..5e60172 100644 --- a/xlsx.js +++ b/xlsx.js @@ -2795,7 +2795,7 @@ function get_cell_style(styles, cell, opts) { if (cell.s && (cell.s == +cell.s)) { return cell.s} // if its already an integer index, let it be if (!cell.s) cell.s = {} - if (cell.z) cell.s.numFmtId = cell.z; + if (cell.z) cell.s.numFmt = cell.z; cell.s = style_builder.addStyle(cell.s); return cell.s; @@ -5743,7 +5743,8 @@ if ((typeof 'module' != 'undefined' && typeof require != 'undefined') || (typeo return numFmt; // we're matching an integer against some known code } - var $numFmt = XmlNode(numFmt) + + var $numFmt = XmlNode('numFmt') .attr('numFmtId', (++customNumFmtId)) .attr('formatCode', numFmt); @@ -5752,7 +5753,7 @@ if ((typeof 'module' != 'undefined' && typeof require != 'undefined') || (typeo var count = this.$numFmts.children().length; this.$numFmts.attr('count', count); - return customNumFmtId; + return customNumFmtId ; }, _addFill: function (attributes) {