Protection problem in XLS

Topics: Developer Forum, User Forum
Mar 23, 2010 at 4:12 PM
Edited Mar 23, 2010 at 4:15 PM
Hello, i try to load a XLS Template file (protectionProblem_template.xls) and copy it to protectionProblem_copy_from_template.xls.
Here the code:

$objReader = @PHPExcel_IOFactory::createReader('Excel5');
$objPHPExcel = @$objReader->load("protectionProblem_template.xls");
$objWriter = @PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');

$tempfile = "protectionProblem_copy_from_template.xls.";

catch(Exception $exc)

the template.xls has two sheets (both the same) where some fields are protected and some not.

For example: Protected: D20, unprotected: D21

After creating the copy from the template the first sheet is completly protected.

I have uploaded both files:

Where is the problem?

Thank you,
Mar 25, 2010 at 9:04 AM
Any ideas?
Mar 26, 2010 at 5:25 AM

Created work item:

Please try with latest source code tomorrow from here and report back if it works.

Mar 29, 2010 at 9:39 AM

Yes it works!

Thank you for your great support!


I have another 2 (little) problems on a different worksheet, but i will post them later.


Thank you again!