Update xlsx.js #917
No reviewers
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#917
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "master"
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?
The property of the custom column can be string
Hello @bigbeef ! Can you share a sample HTML table with the
row-type
attribute?parse_dom_table
is called on aTABLE
DOM elementrow
is theTR
elementelt
in context is the individualTD
elementrow-type
is not a standard attribute forTD
elements, so it's unclear why the change is necessary.”row-type“ is a custom type, and it is possible that some columns are date types and some columns are string types
if the columns "idCard" not "string",it will be

but i want

Since you're generating the HTML directly, and you know you want those values to be text, would it make sense to prepend with a zero-width space character? For example, this should give you the desired result:
To try this in the table demo, run the following JS in your console then export to XLSX:
You should end up with a file like issue917.xlsx :
The "correct" approach is to pass format metadata with
mso-number-format
CSS attribute. For example:(the
@
format is text).The problem with this approach is that browsers like Chrome won't actually let you access those
mso-
attributes (so this will fail withtable_to_sheet
andtable_to_book
):There will be a space in front
It's not perfect
@bigbeef . Would you object to renaming the attribute
t
and setting the value tos
for string:That will line up with the internal representation of the standard data types and will eventually allow us to fine-tune the export and import.
of course
this's a good idea
We'll cut a release tomorrow with the included changes.
ok,thanks
Pull request closed