问题
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 one is to be avoided?
I tend to go with PHP-Excel.
thx in advance for your thoughts...
K
回答1:
I used PHP-Excel for many times. One of authors have some examples on blog, sorry only in czech.
回答2:
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.
来源:https://stackoverflow.com/questions/1606523/handling-office-open-xml-xlsx-documents-with-php