Possible to skip first n rows when parsing? #215
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#215
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?
Hi, is it possible to skip the first n rows when parsing, I am parsing like this (in coffee)
@nottinhill There's no option at the moment to skip the first
n
rows. There are a few easy ways to work with the existing utilities:A) If you using standard utility functions, you can change the worksheet
!ref
property to restrict to a subset of the worksheet:B) You can directly slice the output of
to_json
(since it's a normal array):The difference between the two approaches is that the latter will still interpret the first row as a header row, whereas the former will completely ignore the fact that the previous rows exist.
@SheetJSDev Where is decode_range documented? I'm getting a: "TypeError: Cannot call method 'decode_range' of undefined"
It would be nice to add this example to the github docs.
A { skipToHeader: 4} would be a nice helper to have.
Correction, I was using a previous version of SheetJS, I don't get the same error. Still would be nice to have this util documented in the sheetjs docs
Even though it could be cleaned up a bit, https://github.com/SheetJS/js-xlsx#json covers how to control the range of the JSON output.