Option to Disable Auto Download in Browser-Based Environment #3054
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#3054
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?
After writing to a file using any of the write functions, it automatically triggers a download, which may not be desired in certain scenarios. I am working in a browser-based environment where I need to send the generated file through an API and do not want it to be automatically downloaded on the client side.
I would like if there's an option that allows users to disable the automatic download behavior after writing to a file. This will provide more flexibility for users who intend to handle file distribution through other means, such as API calls.
There is a live demo of the exact workflow: https://docs.sheetjs.com/docs/demos/net/upload/#fetch Starting from an array of arrays of data, it generates a XLSX file using
write
and sends a POST request.More generally, "API Reference > Writing Files" covers this: https://docs.sheetjs.com/docs/api/write-options
write
/writeXLSX
returns file data. It does not initiate a file write or download.writeFile
/writeFileXLSX
ultimately uses the same logic and attempts to generate a file based on platform.