 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
bigskypenguin
Joined: 20 Jun 2009 Posts: 1
|
Posted: Sat Jun 20, 2009 12:07 am Post subject: setLocked method in Spreadsheet_Excel_Writer |
|
|
Hey all,
I am trying to use the setLocked method to protect cells from being modified by viewers but having no luck. Here is how I create a format and attempt to protect a cell.
$format_right_locked =& $workbook->addFormat();
$format_right_locked->setAlign('right');
$format_right_locked->setNumFormat('0.00');
$format_right_locked->setLocked();
And then...
$worksheet->writeFormula($row,9, "=SUM($start:$end)",$format_right_locked);
But the cell is still able to be modified after the spreadsheet is created and opened.
I also tried....
$worksheet->protect('passwordhere');
...both right after the sheet is created, and right before writing, but neither seemed to have any affect.
I'm desperate because this is the last step before the code can go into production so I'm at a standstill. Any help will be greatly appreciated.
Thanks,
Skip |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|