Workbook level security

Nov 14, 2009 at 8:11 AM

I havent been back here in quite some time. I noticed that the feature set now lists workbook level security. Is this to say i can password protect a workbook and php excel will read it now? Before I htink the issue was whenever you password protect a workbook in excel it encrypts the document rendering it unreadable by php excel or something.

Developer
Nov 14, 2009 at 9:31 AM

>> Is this to say i can password protect a workbook and php excel will read it now?

Unfortunately not. What you are talking about is probably file protection where users can't even open the Excel file without the password. This is different from workbook protection. Workbook protection is to prevent the user from things such as creating/moving sheets etc, but it does not prevent them from opening the Excel file itself. This is again different from worksheet protection which is to prevent the user from editing cells, formatting columns etc. in a certain sheet.

Last time we looked at file protection, the conclusion was that there was not sufficient information about the algorithms to read/write such files.

Nov 14, 2009 at 12:53 PM

Actually I am talking about workbook level security where you put a password on the file to ensure worksheets do not get moved but anyone can open the file.

Developer
Nov 15, 2009 at 5:12 PM

I guess you are referring to the problem where PHPExcel_Reader_Excel5 can't read a file with a workbook level protection password.

Work item created so you can monitor this:

http://phpexcel.codeplex.com/WorkItem/View.aspx?WorkItemId=10946

It is not at the top of my to-do list, but I will eventually dig into this.

Jan 17, 2011 at 12:20 PM

This is a show-stopper for my current project.

Is there anything I can do to help get this work item fixed?

Coordinator
Jan 17, 2011 at 12:48 PM
increddibelly wrote:

This is a show-stopper for my current project.

Is there anything I can do to help get this work item fixed?

 Well, this is an open source project, so you can always look at writing the code yourself.

I'm not aware of any other PHP libraries for handling Excel files that can read/write files with workbook-level protection either. The only method that I know is using COM.

Jun 29, 2012 at 5:19 AM

Since 2009 and still no solution to read/write Excel files with password?

Jun 29, 2012 at 7:30 AM

What have you tried to implement it?

Jun 29, 2012 at 9:22 AM

I needed to read / write files with password. But I did not find any class that does it. All use only password on the cells.
This is the best documentation I found about it: http://www.openoffice.org/sc/excelfileformat.pdf
In other languages ​​there are several references and examples, but in php I spent hours searching without success =[