Currently, I'm using gem caxlsx for generating my excel'
is there anyone try to file a password before generating the excel file?
the goal here. is the user click the button then some text will pop up to type the password of excel. then the system will generate the excel automatically download in the browser.
As already mentioned
caxlsx
does not have encryption support yet.Probably it's not the best workaround, but there is a CLI tool called secure-spreadsheet. You can install it on the server and use in your code like this:
The
result
will be an encrypted xlsx string, then you can write it to a file or send it as a response - it will prompt a user to enter a password