diff --git a/bits/66_wscommon.js b/bits/66_wscommon.js index 26a128d..d62e348 100644 --- a/bits/66_wscommon.js +++ b/bits/66_wscommon.js @@ -88,9 +88,9 @@ function safe_format(p/*:Cell*/, fmtid/*:number*/, fillid/*:?number*/, opts, the try { if(opts.cellNF) p.z = SSF._table[fmtid]; } catch(e) { if(opts.WTF) throw e; } - if(p.t === 'z') return; + if(p.t === 'z' && !opts.cellStyles) return; if(p.t === 'd' && typeof p.v === 'string') p.v = parseDate(p.v); - if(!opts || opts.cellText !== false) try { + if((!opts || opts.cellText !== false) && p.t !== 'z') try { if(SSF._table[fmtid] == null) SSF.load(SSFImplicit[fmtid] || "General", fmtid); if(p.t === 'e') p.w = p.w || BErr[p.v]; else if(fmtid === 0) {