PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
setLocked method in Spreadsheet_Excel_Writer

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> File Formats
View previous topic :: View next topic  
Author Message
bigskypenguin



Joined: 20 Jun 2009
Posts: 1

PostPosted: Sat Jun 20, 2009 12:07 am    Post subject: setLocked method in Spreadsheet_Excel_Writer Reply with quote

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
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> File Formats All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
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



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement