Read + write style information to .xlsx #263

Open
protobi wants to merge 104 commits from protobi/master into master
3 changed files with 8 additions and 6 deletions
Showing only changes of commit 576b59f96a - Show all commits

View File

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

View File

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

View File

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