纯php 写入xls表格,PhpSpreadsheet一个读取和写入电子表格文件的纯 PHP 库

PhpSpreadsheet

Master: 68747470733a2f2f7472617669732d63692e6f72672f5048504f66666963652f50687053707265616473686565742e7376673f6272616e63683d6d617374657268747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f5048504f66666963652f50687053707265616473686565742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d617374657268747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f5048504f66666963652f50687053707265616473686565742f6261646765732f636f7665726167652e706e673f623d6d617374657268747470733a2f2f706f7365722e707567782e6f72672f7068706f66666963652f70687073707265616473686565742f646f776e6c6f6164732e706e6768747470733a2f2f706f7365722e707567782e6f72672f7068706f66666963652f70687073707265616473686565742f762f737461626c652e706e6768747470733a2f2f706f7365722e707567782e6f72672f7068706f66666963652f70687073707265616473686565742f6c6963656e73652e706e6768747470733a2f2f696d672e736869656c64732e696f2f62616467652f4749545445522d6a6f696e253230636861742d677265656e2e737667

Develop: 8c92bc39aac8593be117f86ac911dd02.png68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f5048504f66666963652f50687053707265616473686565742f6261646765732f7175616c6974792d73636f72652e706e673f623d646576656c6f7068747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f5048504f66666963652f50687053707265616473686565742f6261646765732f636f7665726167652e706e673f623d646576656c6f70

PhpSpreadsheet is a library written in pure PHP and providing a set of classes that allow you to read from and to write to different spreadsheet file formats, like Excel and LibreOffice Calc.

File formats supported

Format

Reading

Writing

Open Document Format/OASIS (.ods)

Office Open XML (.xlsx) Excel 2007 and above

BIFF 8 (.xls) Excel 97 and above

BIFF 5 (.xls) Excel 95

SpreadsheetML (.xml) Excel 2003

Gnumeric

HTML

SYLK

CSV

PDF (using either the tcPDF, DomPDF or mPDF libraries, which need to be installed separately)

Requirements

PHP version 5.5 or higher

PHP extension php_zip enabled (required if you need PhpSpreadsheet to handle .xlsx .ods or .gnumeric files)

PHP extension php_xml enabled

PHP extension php_gd2 enabled (optional, but required for exact column width autocalculation)

PHP version support

Support for PHP versions will only be maintained for a period of six months beyond the end-of-life of that PHP version

Want to contribute?

If you would like to contribute, here are some notes and guidelines:

All new development happens on feature/fix branches referenced with the GitHub issue number, and are then merged to the develop branch; so the develop branch is always the most up-to-date, working code

The master branch only contains tagged releases

If you are going to be submitting a pull request, please fork from develop, and submit your pull request back as a fix/feature branch referencing the GitHub issue number

Code changes must be validated by PHP-CS-Fixer and PHP_CodeSniffer (via ./vendor/bin/php-cs-fixer fix --verbose && ./vendor/bin/phpcs samples/ src/ tests/ --standard=PSR2 -n)

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 develop branch.

However PhpSpreadsheet is still unstable and not yet released. So if you need stability stick to PHPExcel until this project is released. If you prefer to live on the edge you can try to install this project manually via composer, but there is no guarantee and it will likely break again before an official release.

License

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值