最新 PHPExcel
If you need to use PHP to create and interact with Microsoft's Excel spreadsheet app, then using PHPExcel is a good way to go.
PHPExcel is a library that has been written in PHP and has a complete set of classes, which will allow you to write to and read from different spreadsheet file formats, such as Excel (BIFF) .XLS, Excel 2007 (OFFICEOPENXML) .XLSX, CSV, LIBRE/OPENOFFICECALC .ODS, GNUMERIC, PDF, and HTML. Because PHPExcel interacts not only with MS Excel but also with other formats, it can be a little hard to get started.
Supported Read File Formats include:
- BIFF 5-8 (.XLS) Excel 95 and above.
- Office Open XML (.XLSX) Excel 2007 and above.
- SpreadsheetML (.XML) Excel 2003.
- Open Document Format/OASIS (.ODS).
- GNUMERIC.
- HTML.
- SYLK.
- CSV.
Supported Write File Formats include:
- BIFF 8 (.XLS) Excel 95 and above.
- Office Open XML (.XLSX Excel 2007 and above.
- HTML.
- CSV.
- PDF*.
Overall, PHPExcel allows you to read, write and create Excel documents in PHP. The only downside is the learning curve; it can be a tad tricky to use, especially for novices.
*By utilising tcPDF, DomPDF or mPDF libraries, which need to be installed separately.