PHPOffice / PHPExcel

ARCHIVED
Other
11.46k stars 4.2k forks source link

Class 'ZipArchive' not found #1342

Closed FabiGjuzi closed 6 years ago

FabiGjuzi commented 6 years ago

Fatal error: Uncaught Error: Class 'ZipArchive' not found in /var/www/html/PHPExcel-1.8/Classes/PHPExcel/Writer/Excel2007.php:220 Stack trace: #0 /var/www/html/PHPExcel-1.8/Examples/33chartcreate-stock.php(142): PHPExcel_Writer_Excel2007->save('/var/www/html/P...') #1 {main} thrown in /var/www/html/PHPExcel-1.8/Classes/PHPExcel/Writer/Excel2007.php on line 220

PowerKiKi commented 6 years ago

https://github.com/PHPOffice/PHPExcel/search?q=Class+%27ZipArchive%27+not+found&type=Issues&utf8=✓

FabiGjuzi commented 6 years ago

None of the above worked for me.

rupsk1607 commented 5 years ago

You have to add below code in phpexcel/Classes/PHPExcel.php PHPExcel_Settings::setZipClass(PHPExcel_Settings::PCLZIP);

note: we should keep library dependent class on the same folder where the library is located, in this case on phpexcel folder.