php - Ubuntu Apache PHP - 创建和写入 Excel 文档

标签 php ubuntu phpexcel

我听说过PHP Excel为了在 PHP 中处理 excel 文档。但是,我是否需要 Ubuntu 系统上的 MS Office 才能工作和提供 excel 文档?或者 PHP Excel 扩展是否可以在任何系统中为 Excel 文档提供服务?

最佳答案

PHPExcel 是纯 PHP,无需以任何方式访问 MS Office

来自 PHPExcel repo on github 的自述文件

PHPExcel is a library written in pure PHP and providing a set of classes that allow you to write to and read from different spreadsheet file formats, like Excel (BIFF) .xls, Excel 2007 (OfficeOpenXML) .xlsx, CSV, Libre/OpenOffice Calc .ods, Gnumeric, PDF, HTML, ... This project is built around Microsoft's OpenXML standard and PHP.



要求
  • PHP 5.2.0 或更高版本
  • 启用 PHP 扩展 php_zip(如果您需要 PHPExcel 来处理 .xlsx .ods 或 .gnumeric 文件,则需要)
  • 启用 PHP 扩展 php_xml
  • 启用 PHP 扩展 php_gd2(可选,但精确列宽自动计算需要)
  • 关于php - Ubuntu Apache PHP - 创建和写入 Excel 文档,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41797762/

    相关文章:

    bash - 具有特定名称的目录的权限被拒绝

    PhpSpreadSheet:如何将工作簿工作表保存在单个 CSV 文件中

    php - 如何从 MySql 中检索表值

    php - 如何将一些数据添加到 mysql 结果集中?

    php - 将数据从 MVC Controller 传递到 PHP 中的 View

    ubuntu - 在 Ubuntu 中创建一个可以 sudo 的用户(Dockerfile)

    android - search.h-在 Android-tiff 4.0.1 上移植 libtiff 时没有这样的文件或目录

    phpexcel - 制作文件以下载而不是保存在服务器中

    php - 使用 PHPExcel 在电子表格中创建表格

    php - 联接和相关子查询