Excel HTML files with tags inside cells results in extra white spaces #1622
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#1622
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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?
When parsing Excel HTML files, the htmldecode function strips new lines from the beginning and end of the cell. If there are HTML elements like DIV or SPAN inside the cell, then new lines before and after the content will be transformed into whitespaces. Here is a jsbin example showing the problem and a possible solution:
https://jsbin.com/muzucuyigo/edit?js,console
The solution of checking for <\s and \s> is not optimal, but is in my opinion better than the current implementation.
Agreed that it is currently incorrect and your solution looks like it addresses the problem, feel free to submit a PR. The line is in
bits/22_xmlutils.js
and feel free to split up that one long line into smaller parts!#1650 closes this issue