php PHP_excel 的替代品

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3930975/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 11:29:11  来源:igfitidea点击:

Alternative for PHP_excel

phpphpexcel

提问by sandeep

Is there any alternative for PHP_excel which can "Export to XLSX/XLS" file in a customized format?

PHP_excel 是否有任何替代方案可以以自定义格式“导出到 XLSX/XLS”文件?

This is a General Referencequestion for the phptag

这是php标签的一般参考问题

采纳答案by Eli

I wrote a very simple class for exporting to "Excel XML" aka SpreadsheetML. It's not quite as convenient for the end user as XSLX (depending on file extension and Excel version, they may get a warning message), but it's a lot easier to work with than XLS or XLSX.

我编写了一个非常简单的类,用于导出到“Excel XML”又名 SpreadsheetML。对于最终用户来说,它不如 XSLX 方便(取决于文件扩展名和 Excel 版本,他们可能会收到警告消息),但它比 XLS 或 XLSX 更容易使用。

http://github.com/elidickinson/php-export-data

http://github.com/elidickinson/php-export-data

回答by Mark Baker

For Writing Excel

用于编写 Excel

  • PEAR's PHP_Excel_Writer(xls only)
  • php_writeexcelfrom Bettina Attack (xls only)
  • XLS File Generatorcommercial and xls only
  • Excel Writer for PHPfrom Sourceforge (spreadsheetML only)
  • Ilia Alshanetsky's Excel extensionnow on github(xls and xlsx, and requires commercial libXLcomponent)
  • PHP's COM extension(requires a COM enabled spreadsheet program such as MS Excel or OpenOffice Calc running on the server)
  • The Open Office alternative to COM (PUNO) (requires Open Office installed on the server with Java support enabled)
  • PHP-Export-Databy Eli Dickinson (Writes SpreadsheetML - the Excel 2003 XML format, and CSV)
  • Oliver Schwarz's php-excel(SpreadsheetML)
  • Oliver Schwarz's original version of php-excel(SpreadsheetML)
  • excel_xml(SpreadsheetML, despite its name)... link reported as broken
  • The tiny-but-strong (tbs) project includes the OpenTBStool for creating OfficeOpenXML documents (OpenDocument and OfficeOpenXML formats)
  • SimpleExcelClaims to read and write Microsoft Excel XML / CSV / TSV / HTML / JSON / etc formats
  • KoolGridxls spreadsheets only, but also doc and pdf
  • PHP_XLSXWriterOfficeOpenXML
  • PHP_XLSXWriter_plusOfficeOpenXML, fork of PHP_XLSXWriter
  • php_writeexcelxls only (looks like it's based on PEAR SEW)
  • spoutOfficeOpenXML (xlsx) and CSV
  • Slamdunk/php-excel(xls only) looks like an updated version of the old PEAR Spreadsheet Writer

For Reading Excel

用于阅读 Excel

A new C++ Excel extension for PHP, though you'll need to build it yourself, and the docs are pretty sparse when it comes to trying to find out what functionality (I can't even find out from the site what formats it supports, or whether it reads or writes or both.... I'm guessing both) it offers is phpexcellibfrom SIMITGROUP.

一个新的 PHP C++ Excel 扩展,虽然你需要自己构建它,而且在试图找出什么功能时,文档非常稀少(我什至无法从网站上找到它支持的格式,或者它是否读或写或两者....我猜两者)它提供的是phpexcellib从SIMITGROUP。

All claim to be faster than PHPExcelfrom codeplexor from github, but (with the exception of COM, PUNO Ilia's wrapper around libXl and spout) they don't offer both reading and writing, or both xls and xlsx; may no longer be supported; and (while I haven't tested Ilia's extension) only COM and PUNO offers the same degree of control over the created workbook.

都声称比来自codeplex或来自github 的PHPExcel更快,但是(除了 COM,PUNO Ilia 围绕 libXl 和 spout 的包装器)它们不提供读取和写入,或 xls 和 xlsx;可能不再受支持;并且(虽然我没有测试 Ilia 的扩展)只有 COM 和 PUNO 对创建的工作簿提供相同程度的控制。