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

can we add password protection to the sheet? #122

Open
jcquarto opened this issue Oct 22, 2024 · 1 comment
Open

can we add password protection to the sheet? #122

jcquarto opened this issue Oct 22, 2024 · 1 comment

Comments

@jcquarto
Copy link

guys, I'm reading through the documentation and don't see anything that refers to password-protecting the XLS file. Is that possible? Is it possible but not part of the gem?

@jmcnamara
Copy link

This is from the XlsxWriter (a sister library) docs:

Although it is possible to password protect a worksheet using the Worksheet
protect method it isn't possible to password protect the entire
workbook/file using XlsxWriter.

The reason for this is that a protected/encrypted xlsx file is in a different
format from an ordinary xlsx file. This would require a lot of additional work,
and testing, and isn't something that is on the XlsxWriter roadmap.

However, it is possible to password protect an XlsxWriter generated file using
a third party open source tool called msoffice-crypt. This works for macOS, Linux and Windows:

    msoffice-crypt.exe -e -p password clear.xlsx encrypted.xlsx

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

No branches or pull requests

2 participants