Connecting Tech Pros Worldwide Help | Site Map

need to programatically password protect for Excel file

Newbie
 
Join Date: May 2009
Posts: 2
#1: May 15 '09
I have created an Excel file using PYExcelerator API. I need to programatically password protect
the file so that it can't be read unless the password is entered.

working in Linux environment.


Any code examples?
Python
Moderator
 
Join Date: Mar 2006
Posts: 1,103
#2: May 19 '09

re: need to programatically password protect for Excel file


Can you password zip the file?
Newbie
 
Join Date: May 2009
Posts: 2
#3: May 20 '09

re: need to programatically password protect for Excel file


I have tried to Password the ZIP file

zipFile=zipfile.ZipFile(zipFileName,"w",zipfile.ZI P_DEFLATED)
.
.
.
zipFile.setpassword("kishore123")

but i am not sure why it is not working.
when i tried to open the Zip it is simply opening with out prompting for Password

Please suggest me

Thanks
Kishore
Newbie
 
Join Date: Jun 2009
Posts: 6
#4: Jun 26 '09

re: need to programatically password protect for Excel file


Hi there,

Whenever you password protect a zip file (doesn't matter the method), whenever you open up the zip file, it won't prompt you for a password (unlike with any other password protected file), but when you unzip or try to open a file in the zip file, it will prompt you for a password.

Hope this is helpful,
Kind Regards
Reply