Columns in lowercase #3109
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
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sheetjs/sheetjs#3109
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?
Usually headers in excel starts with a capital letter and json headers are written in lowercase
Something like
Returned as
Is there an easy performant way to return the header in lowercase with
sheet_to_json
?And perhaps also add support for replacing whitespaces?
Something like
Name of the book
returned as
name_of_the_book
https://docs.sheetjs.com/docs/api/utilities/array#array-output
Using the example in the live codeblock:
If you want to override the headers, pass an array as the
header
option and passrange: 1
to skip the first row:Note that you must disambiguate the headers directly.
If you want to do this dynamically, pull the header row using
sheet_to_json
after restricting the range:If you want to replace whitespace with underscores, just do it in the map: