Unable to get property 'encode_cell' of undefined or null reference in IE11 compatibility View #952
Labels
No Label
DBF
Dates
Defined Names
Features
Formula
HTML
Images
Infrastructure
Integration
International
ODS
Operations
Performance
PivotTables
Pro
Protection
Read Bug
SSF
SYLK
Style
Write Bug
good first issue
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sheetjs/sheetjs#952
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The XLSX write script doesn't work in IE11 Compatibility Mode, whilst in standards mode it works fine. It throws Unable to get property 'encode_cell' of undefined or null reference for function sheet_from_array_of_arrays()
Here is my code:
As I see in Debugger, XLSX object is created normally, whilst utils property is showed as undefined for some reason.
How can I fix this? Compatibility View is a must for my use-case.
Can you make that page available publicly to reproduce? The browser test suite works for some round trip tests but bombs out because of some missing JSON typeof guards, so the issue is likely in your HTML Also see if adding a JSON shim, like https://github.com/douglascrockford/JSON-js, helps -- compatibility mode 7 has no default JSON object
Here's the situation: The test suite loads using the 0.11.17 version of the script. It fails on a few BIFF5 tests, which I just fixed in the comment. Locally the tests pass in IE11 with compatibility view level 5 as well as level 7, so I'm fairly confident in saying that any issues are likely coming with your HTML. Are you loading the shim.js script?
Unfortunately no. This page works in enterprise network and I cannot reproduce it.
I wasn't, but just now I added shim, and the error didn't disappear. Still the same error.
Any suggestions?
Can you please, comment smth?
The test suite http://oss.sheetjs.com/js-xlsx/tests/ loads and runs in all of the IE11 compatibility modes (including mode 5 and mode 7). Almost every test uses
XLSX.utils.encode_cell
, so your issue is not reproducible in the public site. The problem almost certainly lies in your code. Since you can't share the containing HTML, drop an email to support@sheetjs.com for more assistance.