Added the Ability to Emit a Blob instead of Download #155
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While working with this lovely repository, I came across a special use-case. I needed to create multiple Excel Spreadsheets and bundle them to one zip file to be downloaded by the user on the client side. This created an obvious issue since the sheets get downloaded automatically, so I created this pull request.
This pull request adds the ability to decide whether to download the Excel file or emit a blob. If the prop
emitBlob
is set to true, then the code will emit a blob, rather than download when the generate method is fired. This gives the ability to create multiple components and loop through them to generate the blobs and then bundle them to one file.But going beyond my use-case, it will also give the users the ability to process the blob or do something else with it, for instance resend the blob to another API or other processing feature on the blob.