Parsing HTML table string with XLSX.read ignores <th> elements #1090
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#1090
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?
I'm trying to convert an HTML table to a CSV file. I have to do the conversion server-side so I pass the table's
outerHTML
as a string via an$.ajax
request to the Node.js server.It seems like the
<th>
tags are ignored and not transferred to the workbook. Is there a way to import them aswell or are they not managed by the library itself? I tried doing a quick search on the codebase and couldn't find any "th", but I'm pretty new to GitHub and modules' structure so I might be missing something.The table looks something like this:
The parsing code, which is executed server-side with Node.js, is the following:
The resulting CSV is the following:
UPDATE:
Replacing
<th>
with<td>
works, even if inside<thead>
CSV:
Still, it would be nice if
<th>
was parsed too. ☺Good catch, we're pushing a fix today