IE8 and first column #350
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#350
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?
So, we all know the first column is ignored when using IE8... after a few hours of debugging I found the problem is coming from
parse_ws_xml_data()
, on the below line:for(ri = typeof tag.r === 'undefined' ? 0 : 1; ri != cells.length; ++ri) {
It should be:
for(ri = 0; ri != cells.length; ++ri) {
Because there is no comment in the code I don't know why there is this checking... But by changing it, then IE8 is now able to show the first column.
So it turns out IE does something unexpected with split on regular expressions when the first match is the beginning of a string. To play along, try
When you split on a string, which is the second case, both IE and other browsers will correctly generate 2 values:
["", "bcdef"]
. For whatever reason, IE is skipping that first value entirely.The guard 2 lines down should address the case anyway, so your proposed patch is sufficient and will be pushed in the next version. That change works down to IE6: