How to specify to trim whitespaces using XLSX.utils.table_to_sheet #849
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#849
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?
is it possible to add this feature?
As a workaround you can do something like
Before you call
XLSX.utils.table_to_sheet
I tried this:
var table = document.getElementById(id);
table.querySelectorAll('tr,th').forEach(elt => elt.innerHTML = elt.innerHTML.trim());
var ws = XLSX.utils.table_to_sheet(table, {raw:true });
no effect, allways whitespaces before and after the value