"Unsupported value type undefined" in ODS when a cell contains a formula that has a blank string result #148

Closed
opened 2014-11-19 21:52:18 +00:00 by user4815162342 · 0 comments
user4815162342 commented 2014-11-19 21:52:18 +00:00 (Migrated from github.com)

I found this issue with a production ODS file, so I narrowed it down to the simplest mechanism that will reproduce the problem. It doesn't look like I can attach the file here, though, so I'll explain what I did.

I created a blank ODS file in LibreOffice, set the first cell of the first sheet to ="". Saved the file. Then I open it up (using node 0.10.33) with a call to xlsx.readFile, and I got the following stack trace:

Error: Unsupported value type undefined
    at pcx (/home/neil/projects/cpes-hot-lunch/jotform-hotlunch/node_modules/xlsx/ods.js:271:22)
    at Object.parse_ods (/home/neil/projects/cpes-hot-lunch/jotform-hotlunch/node_modules/xlsx/ods.js:405:9)
    at parse_ods (/home/neil/projects/cpes-hot-lunch/jotform-hotlunch/node_modules/xlsx/xlsx.js:4872:13)
    at parse_zip (/home/neil/projects/cpes-hot-lunch/jotform-hotlunch/node_modules/xlsx/xlsx.js:4936:58)
    at readSync (/home/neil/projects/cpes-hot-lunch/jotform-hotlunch/node_modules/xlsx/xlsx.js:5154:9)
    at Object.readFileSync [as readFile] (/home/neil/projects/cpes-hot-lunch/jotform-hotlunch/node_modules/xlsx/xlsx.js:5159:9)
    ...
I found this issue with a production ODS file, so I narrowed it down to the simplest mechanism that will reproduce the problem. It doesn't look like I can attach the file here, though, so I'll explain what I did. I created a blank ODS file in LibreOffice, set the first cell of the first sheet to `=""`. Saved the file. Then I open it up (using node 0.10.33) with a call to xlsx.readFile, and I got the following stack trace: ``` Error: Unsupported value type undefined at pcx (/home/neil/projects/cpes-hot-lunch/jotform-hotlunch/node_modules/xlsx/ods.js:271:22) at Object.parse_ods (/home/neil/projects/cpes-hot-lunch/jotform-hotlunch/node_modules/xlsx/ods.js:405:9) at parse_ods (/home/neil/projects/cpes-hot-lunch/jotform-hotlunch/node_modules/xlsx/xlsx.js:4872:13) at parse_zip (/home/neil/projects/cpes-hot-lunch/jotform-hotlunch/node_modules/xlsx/xlsx.js:4936:58) at readSync (/home/neil/projects/cpes-hot-lunch/jotform-hotlunch/node_modules/xlsx/xlsx.js:5154:9) at Object.readFileSync [as readFile] (/home/neil/projects/cpes-hot-lunch/jotform-hotlunch/node_modules/xlsx/xlsx.js:5159:9) ... ```
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sheetjs/sheetjs#148
No description provided.