8000 Invalid time value Exception · Issue #488 · exceljs/exceljs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Invalid time value Exception #488
Closed
Closed
@ilijaz

Description

@ilijaz

I got the exception when i opened this https://yadi.sk/d/9RC1JcPY3S2kHa xlsx document template

null: RangeError: Invalid time value
message: "Invalid time value"
stack: "RangeError: Invalid time value
    at Date.toISOString (<anonymous>)
    at module.exports._format (/var/www/wialon/agri/node_modules/exceljs/dist/es5/xlsx/xform/simple/date-xform.js:17:21)
    at module.exports.render (/var/www/wialon/agri/node_modules/exceljs/dist/es5/xlsx/xform/simple/date-xform.js:36:34)
    at module.exports.render (/var/www/wialon/agri/node_modules/exceljs/dist/es5/xlsx/xform/core/core-xform.js:64:29)
    at module.exports.toXml (/var/www/wialon/agri/node_modules/exceljs/dist/es5/xlsx/xform/base-xform.js:94:10)
    at /var/www/wialon/agri/node_modules/exceljs/dist/es5/xlsx/xlsx.js:441:28
    at new Promise (<anonymous>)
    at new Promish (/var/www/wialon/agri/node_modules/promish/lib/promish-class.js:23:9)
    at module.exports.addCore (/var/www/wialon/agri/node_modules/exceljs/dist/es5/xlsx/xlsx.js:439:12)
    at /var/www/wialon/agri/node_modules/exceljs/dist/es5/xlsx/xlsx.js:608:55
    at <anonymous>"
__proto__: Error {constructor: , name: "RangeError", message: "", …}

I did this dirty hack and now everything works fine

  this._format = options.format || function (dt) {
    try { return dt.toISOString(); }
    catch(e) { console.log(e); return '' }
  };

I don't know why it's happening because i'm newbee in js and don't have enough time to understand exceljs lib at all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0