I want to create an excel file with some data and password-protect the entire file, not just worksheets. I've looked around many places but I haven't found a way without paid libraries like spire.xls package. I couldn't install it for obscure reasons. I'm new in Python so those errors are beyond me. I found that here.
How to password-protect an XLSX file in Python
50 Views Asked by Camilo At
1
There are 1 best solutions below
Related Questions in PYTHON-3.X
- SQLAlchemy 2 Can't add additional column when specifying __table__
- Writes to child subprocess.Popen.stdin don't work from within process group?
- Platform Generation for a Sky Hop clone
- What's the best way to breakup a large test in pytest
- chess endgame engine in Python doesn't work perfectly
- Function to create matrix of zeros and ones, with a certain density of ones
- how to create a polars dataframe giving the colum-names from a list
- Django socketio process
- How to decode audio stream using tornado websocket?
- Getting website metadata (Excel VBA/Python)
- How to get text and other elements to display over the Video in Tkinter?
- Tkinter App - My Toplevel window is not appearing. App is stuck in mainloop
- Can I use local resources for mp4 playback?
- How to pass the value of a function of one class to a function of another with the @property decorator
- Python ModuleNotFoundError for command line tools built with setup.py
Related Questions in XLSX
- how ejs converting to excel
- Export Gradient coloured dataframe to excel
- How can I optimize creating an xlsx file?
- Script not list excel search result for me
- Fatal Error - Could not open xlsx for reading PHPspreadsheet
- Error reading .xlsx files. The script was shared, I haven´t modified it. I make sure to set the working directory and files
- Colors the code in a XLSX .template file with Visual Studio Code
- xlsx - columns getting mapped incorrectly while reading into spark dataframe using pyspark
- How to password-protect an XLSX file in Python
- How to get Header info or Footer info from XLSX File with Angular
- Kendo-Vue Excel Export Currency Formatting
- PHP Spreadsheet modify one sheet without corrupting others
- write xlsx files from a list of dataframes in R
- How to read xlsx file and store it in database in low memory using node.js?
- Fast appending data to an existing Excel (.xlsx) file in-memory without losing pivots/slicers
Related Questions in PASSWORD-PROTECTION
- How to provide password authentication for LDAP server in Java?
- Securing Access database
- Hashing Password in ASP.NET and Resolving it In SQL Procedure
- Meteor Password Protect complete Application
- mysql how to encrypt and decrypt a column using aes
- How to store password used for web scraping?
- Website Protection- Am i doing it right?
- Unzip with password (with native Windows zip)
- Forgot my password for secure database
- Password protected page
- Reverting the WordPress site name to localhost
- Use file data without giving anyone else permission
- Detect if a .doc file is password protected on Linux
- How to avoid having keystore/trustore plain text password in code base?
- How to read user & password from text file
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Alright, I got it. Thanks to the people in the comments. What I wanted was to create a file and copy it on some SMB server. The file is XLSX, needs a password to be opened and a sensitivity label.
But as far as this question goes, to password-protect it, I created the file with xlswriter, created a plain handler, then opened an OOXMLFile with the previous handler, encrypted it (which means add a pwd to open it) then closed the original plain file:
I also achieved it with xlwings but it was opening the file asking me for manual setup of the sensitivity label, which is why I ended up using openpyxl to add the label. I smbclient.shutil to copy the file to the shared drive.