Load a file, Add one column (or row) and write a value in, how to do? #561
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#561
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?
I can not figure out how to do it:
It's possible to do it?
It's possible write a value out of ws['!ref']?
How to update this value (!ref)?
It's possible to see an example?
Thanks!
There's a wildly destructive way to do this:
sheet_to_json
with{raw:true, header:1}
)-- insert your row by splicing the outer array with a empty row
-- insert your column by iterating through every row
aoa_to_sheet
)The hard part of manipulating the raw object representation is making sure everything else is consistent. Take formulae. How do you ensure that you update formula references when you insert or delete rows or columns? You need to walk every formula and fix them.
We added a
sheet_add_aoa
helper function that can modify an existing worksheet with data specified in an array of arrays.sheet_add_json
takes an array of JS objects. See #947 for a complete example.