XLSX.writeFileAsync attempts to use callback as an options object if options are omitted #2865
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#2865
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?
The documentation says:
But if o is omitted:
XLSX.writeFileAsync(filename, wb, cb)
the package takes the callback function as options object and attempts to resolve book type on the callback function. This eventually runs into the error:
The code also first sets the type to file seemingly redundantly, and then later to buffer.
If the documentation is correct and implementation should follow what it says, the function definition should be something along the lines of (disclaimer: not tested):
Version 0.18.5.
Thanks for reporting! This isn't surprising as there are no tests for that function.
In the interim, it's straightforward to do the write from user space. Sketch: