Password protect excel workbook

1,489 views
Skip to first unread message

anchal...@gmail.com

unread,
Feb 25, 2015, 5:24:33 AM2/25/15
to openpyx...@googlegroups.com
How can I password protect my excel workbook or worksheet?

Charlie Clark

unread,
Feb 25, 2015, 6:20:49 AM2/25/15
to openpyx...@googlegroups.com
Am .02.2015, 11:24 Uhr, schrieb <anchal...@gmail.com>:

> How can I password protect my excel workbook or worksheet?

The question is unclear. openpyxl supports passwords which provide a
certain degree of protection at user level from changes, ie. in Excel
users will be asked to provide a password if they want to change anything.

This is set using the worksheet protection object:

http://openpyxl.readthedocs.org/en/latest/api/openpyxl.worksheet.html?highlight=password#openpyxl.worksheet.protection.SheetProtection.password

openpyxl does not and probably never will support file-level encryption as
it's not in the specs. However, as Excel files are just zip archives, you
could simply use the zipfile module to set a password for the archive.

Charlie
--
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Kronenstr. 27a
Düsseldorf
D- 40217
Tel: +49-211-600-3657
Mobile: +49-178-782-6226

anchal...@gmail.com

unread,
Mar 2, 2015, 4:23:19 AM3/2/15
to openpyx...@googlegroups.com
Thank you Charlie.

Actually I want to password protect by excel workbook. Do you know of any other modules which might assist me in achieving this? 

Charlie Clark

unread,
Mar 2, 2015, 4:23:53 AM3/2/15
to openpyx...@googlegroups.com
Am .03.2015, 10:23 Uhr, schrieb <anchal...@gmail.com>:

> Thank you Charlie.
> Actually I want to password protect by excel workbook. Do you know of any
> other modules which might assist me in achieving this?

No.
Reply all
Reply to author
Forward
0 new messages