Add A Password (unattended) To Existing Xlsx Without Windows Exclusive Tools
I'm generating an xlsx file using Openpyxl. And i'd like to protect the workbook itself using a password that I have as a variable in the same script. This can be set manually usin
Solution 1:
What you're asking for isn't currently available in any Python package. The best you can probably do for now is to install a package implemented in some other language, and call that package from Python (using os.system()
or the subprocess
module or something along those lines).
The two that I know of are
secure-spreadsheet
is basically a command-line wrapper for xlsx-populate
.
It seems like you want to be able to do this without having Excel installed, but for completeness I'll mention that if you do have Excel installed, then another way to do this is to automate Excel itself, which can be done in Python using xlwings, or the underlying packages that it depends upon: pywin32 on Windows or appscript on Mac.
Post a Comment for "Add A Password (unattended) To Existing Xlsx Without Windows Exclusive Tools"