PhpSpreadsheet README

The project's README from github.com/PHPOffice/PhpSpreadsheet. As one markdown file: README.md.

PhpSpreadsheet

Build Status Code Coverage Total Downloads Latest Stable Version License Join the chat at https://gitter.im/PHPOffice/PhpSpreadsheet

PhpSpreadsheet is a library written in pure PHP and offers a set of classes that allow you to read and write various spreadsheet file formats such as Excel and LibreOffice Calc.

This is the master branch, and is maintained for security and bug fixes.

PHP Version Support

LTS: For maintained branches, support for PHP versions will only be maintained for a period of six months beyond the end of life of that PHP version. Dropping support for versions after that date will not be considered a breaking change.

Currently the required PHP minimum version is PHP 8.2, and we will support that version until 30th June 2027.

See the composer.json for other requirements.

Installation

See the install instructions.

Documentation

Read more about it, including install instructions, in the official documentation. Or check out the API documentation.

Please ask your support questions on StackOverflow, or have a quick chat on Gitter.

Patreon

I am now running a Patreon to support the work that I do on PhpSpreadsheet.

Supporters will receive access to articles about working with PhpSpreadsheet, and how to use some of its more advanced features.

Posts already available to Patreon supporters:

And for Patrons at levels actively using PhpSpreadsheet:

The Next Article (currently Work in Progress):

My aim is to post at least one article each month, taking a detailed look at some feature of MS Excel and how to use that feature in PhpSpreadsheet, or on how to perform different activities in PhpSpreadsheet.

Planned posts for the future include topics like:

After a period of six months exclusive to Patreon supporters, articles will be incorporated into the public documentation for the library.

PHPExcel vs PhpSpreadsheet ?

PhpSpreadsheet is the next version of PHPExcel. It breaks compatibility to dramatically improve the code base quality (namespaces, PSR compliance, use of latest PHP language features, etc.).

Because all efforts have shifted to PhpSpreadsheet, PHPExcel will no longer be maintained. All contributions for PHPExcel, patches and new features, should target PhpSpreadsheet master branch.

Do you need to migrate? There is an automated tool for that.

License

PhpSpreadsheet is licensed under MIT.

PhpSpreadsheet (PHPOffice/PhpSpreadsheet)

Searching Database…

这是什么?PhpSpreadsheet 是一个纯 PHP 库,用于读写 Excel、LibreOffice Calc 等电子表格文件,无需安装 Excel 或任何外部软件。
这是独立应用,还是要加到我代码里的库?它是一个 PHP 库,需要作为依赖项引入你自己的 PHP 项目中,而不是独立应用程序。
怎么把它添加到项目中?通过 Composer 安装到你的 PHP 项目中;README 中提供了官方安装说明,包含完整的设置细节。
我需要什么 PHP 版本?当前要求的最低 PHP 版本是 8.2,根据项目的 LTS 政策,支持到 2027 年 6 月 30 日。
这和 PHPExcel 一样吗?不一样。PhpSpreadsheet 是 PHPExcel 的继任者,代码经过重写和改进(使用命名空间、符合 PSR 规范、采用现代 PHP),与旧库不兼容;旧库已不再维护。
我能把现有的 PHPExcel 项目迁移到 PhpSpreadsheet 吗?可以。README 中提到了一个自动迁移工具,可帮助将 PHPExcel 代码转换为 PhpSpreadsheet。
除了 xlsx,它还能读写哪些文件格式?根据仓库主题标签,除标准 Excel 格式外,它还支持 xls、xlsx、ods(OpenDocument 电子表格)、gnumeric 和 sylk 格式。
Creator
PHPOffice
Size
82.1 MB
Stars
14K
Age
10y
Commits · 90 Days