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开发者_Python百科 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.
精彩评论