Handling office open xml (xlsx) documents with PHP
I need to create sort of a php based Excel (xslx) handling component. I figured that there are several open source projects around which are into this. Does anyone has particular experiences / advice on this for me? I.e. which one to go with, which on开发者_开发百科e is to be avoided?
I tend to go with PHP-Excel.
thx in advance for your thoughts...
K
It depends on what you want to accomplish. If you need to precisely generate an excel file, such a package is the way to go. Using it, you can specify the spreadsheet as much as you like/need.
If you need to open a file and search-and-replace in it, usually such packages are unable to do so. Then you had better manually modify the file:
- Open it as a zip
- read the structure
- modify the xml-files
- save them back to the zip
- Rename the zip to .xlsx
Sounds tedious, but is a tremendous learning experience and gives you even more control over the file.
I used PHP-Excel for many times. One of authors have some examples on blog, sorry only in czech.
精彩评论