ZipArchive Alternative

Topics: Developer Forum, Project Management Forum, User Forum
Jun 23, 2009 at 11:02 AM


I am currently working on a project to create excel 2007 files with filter options. My hosting company don't offer the enabling of the php_zip extenstion and therefore can't use the ZipArchive class.

I was just wondering whether there is an alternate solution to generating excel files in 2007 format?



Jun 23, 2009 at 3:04 PM

No solutions? Any help is appreciated? What does ZipArchive actually do and how does it save the xlsx file?



Jun 23, 2009 at 9:44 PM

Excel 2007 files are zip archives as you may discover if you rename the file from .xlsx to .zip and open it with a utility that can handle zip files.

ZipArchive is used to handle zip archives with PHP. It is needed with PHPExcel_Reader_Excel2007 and PHPExcel_Writer_Excel2007, but not necessary to read and write xls files.

vadik56 who posted this in the wiki under "Requirements":

If php_zip module is not available on your server then php wrapper for zip/unzip binaries can be used instead:

I have not tried it myself, but perhaps you can try it and verify the solution.

Nov 16, 2009 at 3:20 PM

I can confirm that with the ZipArchive class from everything works fine (if the server has the zip and unzip binaries installed). Thanks for the suggestion.