Export Named Range to CSV #708
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#708
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 there,
I see there are functions to convert sheet to csv, but how do I convert a named range to csv?
Thanks
Here is an example function returning the necessary information from a named range to iterate that range of a workbook.
Their may be a more elegant way, but works pretty well for me.
@harmon25 That looks really nice! The 3-d reference parsing (where you split on the sheet name) probably should be part of the decode_range utility function. There are a few small corner cases like worksheets with spaces in the name (so you'd have to check if the first character is a double-quote and parse accordingly)
Thanks! @reviewher - tidied it up a bit more.
Yea some corner cases will break this for sure - also if the named range is not scoped to the workbook and instead a sheet - pretty sure the
range.Ref.split("!")
will fail...let workbook = XLSX.readFile("some_xlsx_file");
let some_named_range = named_range(wb, "defined_name");
mast be change to
let workbook = XLSX.readFile("some_xlsx_file");
let some_named_range = named_range(workbook , "defined_name");