Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write Blob, instead of just string #78

Open
ShivamJoker opened this issue Oct 31, 2023 · 2 comments
Open

Write Blob, instead of just string #78

ShivamJoker opened this issue Oct 31, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@ShivamJoker
Copy link

Feature
I am creating an XLSX file and I would like to save it in the file system.

But right now the only way is to convert it to string, which might not work since it's a compressed files.

Motivation
It can be used to save images and other media files too.

@ShivamJoker ShivamJoker added the enhancement New feature or request label Oct 31, 2023
@ShivamJoker
Copy link
Author

I tried the base64 method but it says bad base64

This is what my string looks like:

data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,UEsDBBQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

@alpha0010
Copy link
Owner

Good idea. Not sure when I will have time to implement though, as I am quite busy currently (pull requests always welcome).

Until then, you can use a workaround to get it working in your app. Trouble is that string is a data URL, not pure base64 data. Here are a variety of ways to convert the blob so it will work with base64 methods of this library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants