excel reader 2007 with password protect woorkbook

Topics: Developer Forum, User Forum
Aug 11, 2012 at 3:17 AM
Edited Aug 11, 2012 at 3:58 AM
Pls help me here i got this error

Severity: Warning

Message: ZipArchive::getFromName() [ziparchive.getfromname]: Invalid or unitialized Zip object

Filename: Reader/Excel2007.php

Line Number: 300

i find it weird because when i try to edit the workbook i get this error

but when i upload it directly right after i download the template no editing has done it work's fine.

the workbook is password protect

i run my application in iis7 and zend server with php version 5.3.9

i search all over in google but i sadly i find no solution to fix my problem.

hope you can help me thanks


the error start in line 5


1.$objReader = PHPExcel_IOFactory::createReader('Excel2007');
2.$objReader->setReadDataOnly(true);
3.$objPHPExcel = $objReader->load(APPPATH.'templates/uploads/'.$filename);
4.$month_arr = TTDate::getMonthOfYearArray2();
5.$month_val = $objPHPExcel->getActiveSheet()->getCell('B5')->getValue();// this is the line 2090 in my code
PHP Fatal error: Call to a member function getCell() on a non-object in C:\inetpub\wwwroot\webservice\trunk\application\p&g\models\services\excelservice.php on line 2090
Coordinator
Aug 12, 2012 at 9:28 PM

PHPExcel does not support password-protected workbooks

Aug 13, 2012 at 2:29 AM
Edited Aug 13, 2012 at 2:30 AM

 

Is there a way to prevent the workbook from being copied?
for example i download the template from the server the user cant copy it and paste in another workbook.?
i know that macro are not supported i just want to know or get an idea if there is other way? to disable copy paste?
thanks.