Home » File Formats » Spreadsheet_Excel_Writer » Bug #9879
Worksheet::protect() shouldn't require a password.
Details
| Request #9879 | Worksheet::protect() shouldn't require a password. |
|---|---|
| Submitted | 2007-01-19 15:45 UTC |
| From | mikej at primatech dot com |
| Status | Open |
| Package | Spreadsheet_Excel_Writer |
| PHP Version | 4.3.9 |
| OS | Centos Linux 4.3 |
| Roadmaps | (Not assigned) |
Comments
[2007-01-19 15:45 UTC] mikej at primatech dot com
Description:
------------
I want to protect a worksheet to prevent accidental formula overwrites, but I don't really want to password protect it. If I use Worksheet::protect(), I'm forced to give a password. It would be nice if the password was optional.
Here is a replacement function:
function protect($password = NULL)
{
$this->_protect = 1;
if ($password != NULL)
$this->_password = $this->_encodePassword($password);
}
I have worked around the problem for now by just setting the private member Worksheet::_protected to 1, but this is obviously not ideal.