PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » File Formats » Spreadsheet_Excel_Writer » Bug #9879

Worksheet::protect() shouldn't require a password.

Details

Request #9879Worksheet::protect() shouldn't require a password.
Submitted2007-01-19 15:45 UTC
Frommikej at primatech dot com
StatusOpen
PackageSpreadsheet_Excel_Writer
PHP Version4.3.9
OSCentos 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.