There are so many excel reader libraries for php with needs zip extension enabled. With out any such library,
1.can we read an excel file with pure php?
2. How much effort it needs?
Thanks /G
http://phpexcel.codeplex.com/
The effort depends on what you want to do :-)
Related
I need to find a PHP library that reads/previews Excel files uploaded by a user.
Does anyone know of any PHP Libraries used to parse .xsls files?
Have you tried phpexcel?
Great documentation and open source library.
I am having problems finding a solution to convert Powerpoint documents to JPEG.
Imagick is not able to handle .PPT
So I used unoconv, which handles .ppt files, but only up to ppt.(97/2003/XP) not 2007 altough it say input yes. It tells me that it cannot handle the source.
Is there a commandline solution or library, that is able to do that ?
PS: unoconv is based on openoffice lib.
Thanks in advance!
First try using unoconv v0.6, and make sure you read the README which has lots of tips to troubleshoot problems. Often issues are caused because e.g. not all required packages have been installed for a specific document format, or an existing office process is causing errors.
The troubleshooting section should be the first thing to look at:
https://github.com/dagwieers/unoconv#troubleshooting-instructions
You could try JODConverter and a recent version of OpenOffice.
I need to be able to read the text of many different file types in PHP, including .doc, .docx, excel, and PDF files. I found a few methods online that require installing multiple packages but I was wondering if there was a better way to do this?
No matter which way you swing it, there is no way to kill all these birds with one stone.
Word Thread:
Reading/Writing a MS Word file in PHP
Excel Thread:
Reading an Excel file in PHP
PDF Thread:
Read pdf files with php
office 2007 is very easy, just need to unzip them and read the xml files, older versions of office and pdf will need extra packages.
I don't think there is native support for reading documents with PHP. Installing these packages is the only choice. :-)
maybe this URL can help you:
https://github.com/PHPOffice
where have:
-PhPWord,
-PhpSpreadsheet(instead of PhPExcel)
...
Are there any good PHP libraries for exporting data to Excel files (not CSV files)?
(An alternative would be creating an ASP.NET Web service that handles Excel file generation, but I would rather not send complex objects over a network in XML format, unless it were strictly necessary.)
For PHP try PHPEXCEL
Excel will accept a standard HTML table masquerading as a .xls file:
<table><tr><td></td></tr></table>
Just set the file extension and mime type on download to the client.
While not a "direct export" library, the PHPExcel library looks to be a nice library for generating Excel files using PHP.
If you do go the .Net route, I highly recommend the NPOI library.
My application generates some .xls files and until now I was using PHPExcel lib. One of the SO has recommend me to use this approach. The problem is that I have to use some .xls templates and to append some data to them.
Who can help me with some pointers. I don't get how xlsBOF() and xlsEOF() works or have to work in my case.
If the approach you use right now works for you, don't bother with anything else.
PHPExcel writes XML files (or more accurately zip files containing XML files), in the new Excel 2007 format. For this reason, it's not compatible with older office versions (unless you install the compatibility plugin in the older office).
What this code does is write a binary XLS file in Excel 97 (BIFF8) format. It's a bit of a hack though. This won't deal correctly with unicode issues and so on. xlsBOF writes the binary header of the XLS file, and xlsEOF the footer.
If you want to write binary XLS files, you're better off using PEAR Excel Writer. I have mixed experiences with that. It gets the job done, but to use it with unicode you have to look through the bug list for a few patches that fix BIFF8 format bugs (the package is poorly maintained). It's still better than the code you linked to though.
Update: PHPExcel supports export as Excel 97 also. I remember that it used to be limited to the office 2007 file format, but apparently currently it's not. So I would recommend using PHPExcel.