Phpexcel Ziparchive Not Found

PHPExcel ZipArchive not found

Certain spreadsheet file formats, such as OfficeOpenXML used as the default format by Excel 2007 and above, require ZipArchive. In most recent versions of PHP, ZipArchive is always available, but prior to PHP 5.3 it needed to be manually installed as a PHP extension.

As @briosheje says If you don't have ZipArchive installed/enabled for your PHP, then you can use

PHPExcel_Settings::setZipClass(PHPExcel_Settings::PCLZIP);

PCLZip is included in the PHPExcel distribution as an alternative to PHP's built-in ZipArchive class, though it is quite a bit slower. Enabling PCLZip allows you to work with zip-based spreadsheet formats even without ZipArchive.

However, when we first bundled PCLZip (originally in PHPExcel 1.7.6), it was only an option when writing zip-based formats, not when reading them. We changed that in PHPExcel 1.8.0, so enabling PCLZip now allows you to read zip-based formats as well as writing them.

The PHPEXcel Reader documentation details the different spreadsheet formats, and explains which ones are zip-based.

Class 'ZipArchive' not found in PHPExcel

The ZipArchive class is provided by the Zip PHP extension that, according to its documentation needs to be enabled on the compilation of PHP (on Linux) or in php.ini (on Windows).

There is a great chance that the extension is not available on your system. Write <?php phpinfo(); in a new file, open it in browser (through the webserver) and check if the Zip extension is compiled or enabled.

If your script is a command line tool then run the phpinfo() file using the PHP CLI or simply run in the terminal:

$ php -m

to see the list of loaded extensions (modules) or

$ php -i

to see the complete information displayed by phpinfo().

Fatal error: Class 'ZipArchive' not found in

For the ZipArchive class to be present, PHP needs to have the zip extension installed.

See this page for installation instructions (both Linux and Windows).

Fatal error: Class 'ZipArchive' not found while only download as zip from online

For the ZipArchive class to be present.
You need php's zip extension installed and enabled.

See this link http://php.net/manual/en/zip.installation.php



Related Topics



Leave a reply



Submit