[BUG] exceljs throws an error "Invalid range in character set" in IE11 due to the lib "xmlchars"
See original GitHub issue🐛 Bug Report
Lib version: 3.8.2
Steps To Reproduce
- In IE11
require('regenerator/runtime');
const Excel = require('exceljs/dist/es5/exceljs.bare');
- Open the page that uses exceljs in IE11
The expected behaviour:
exceljs should work fine in IE11
Possible solution (optional, but very helpful):
The root cause is that exceljs uses saxes that uses xmlchars. And xmlchars uses regular expressions with the unicode flag (“u”) that cannot work in IE (so an error “Invalid range in character set” is thrown)
new RegExp(“^[”+t.NAME_START_CHAR+“]$”,“u”)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Why ExcelJs plugin is not working in IE11? - Stack Overflow
I am using Angular 9 and excelJs 4.1.1, this is working fine in chrome but only in IE11 giving Error: Invalid range in...
Read more >DataGrid - The latest version of ExcelJS doesn't work in IE11
Hi Team, I imported latest version of ExcelJS in my JS file. ... ExcelJS throws an error "Invalid range in character set" in...
Read more >Lintian Hints for People - Debian
We have the following e-mail addresses on file: pkg-javascript-devel@alioth-lists.debian.net; pkg-javascript-devel@lists.alioth.debian.org.
Read more >invalid range in character class at offset [Solved] - YouTube
Error : Compilation failed: invalid range in character class at offset [Solved].
Read more >"invalid range in character class": JavaScript Error Solved
Therein lies the problem. If you want a regular expression to test for the presence of a dash/minus sign as a dash/minus sign,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for reporting this. As per https://github.com/exceljs/exceljs/pull/1193, you’ll need to polyfill unicode support in IE11, for example like this (before requiring exceljs):
The above fixed the issue on my windows laptop running IE11