diff --git a/xlsx.js b/xlsx.js index c29f5ce..aa0e3c3 100644 --- a/xlsx.js +++ b/xlsx.js @@ -651,7 +651,7 @@ function eval_fmt(fmt, v, opts, flen) { case '[': o = c; while(fmt[i++] !== ']' && i < fmt.length) o += fmt[i]; - if(o.substr(-1) !== ']') throw 'unterminated "[" block: |' + o + '|'; + if(o.slice(-1) !== ']') throw 'unterminated "[" block: |' + o + '|'; if(o.match(abstime)) { if(dt==null) { dt=parse_date_code(v, opts); if(dt==null) return ""; } out[out.length] = {t:'Z', v:o.toLowerCase()};