[sheet_to_json] Range option: Support "end of column" selection #3008
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#3008
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?
Description
XLSX.utils.sheet_to_json(ws, opts)
gives you the option to select a range in A1-Style bounded range notation:Sadly there is not possibility to select a whole column.
Issue
In order to select a range from a specified row to the end of the worksheet you need to know forehand how many rows the worksheet has.
That's pretty cumbersome.
Suggestion
Consider adding the possibility to specify the end of columns with a letter, but without a number, e.g.:
⮤ This should ideally return you all rows between A5 and the end of the worksheet.
You don't need to know this in advance. Here's a programmatic solution:
You can also pass a number to start processing on the specified row (see https://docs.sheetjs.com/docs/api/utilities/array#array-output). Passing
range: 3
is equivalent to:The asymmetric range
A5:A
looks cool but the main issue is that it is not a valid range according to Excel.