Local clone of [PhpSpreadsheet](https://github.com/PHPOffice/PhpSpreadsheet/)
Go to file
Mikkel Paulson 1853aaac79 Add option to suppress validation of sheet titles (#186)
Add option to suppress validation of sheet titles

Based on a "lowest common denominator" approach to compatibility,
we will continue to enforce a 31-character limit for sheet titles.
However, this limit should not be enforced when loading an existing
file.

Added a new optional parameter to Worksheet::setTitle() and
Worksheet::setCodeName() to suppress validation and massaging,
based on the premise that existing files should be given a
best-effort approach to loading and parsing. Unfortunately, it's
not possible with the current architecture to prevent users from
making use of this functionality, aside from with a strongly-worded
warning.

Added test coverage. I didn't see any existing unit tests of the
Worksheet class, so I created a new test to cover these methods.

Fixes #176
2017-07-14 10:53:13 +02:00
.github Add issue and PR template 2017-05-07 16:54:41 +02:00
bin Make global usage of `use` instead of FQCN 2017-05-18 00:10:16 +02:00
docs HTML reader supports text and background color from inline CSS, for `td` and `th` element 2017-06-23 11:28:17 +02:00
samples HTML reader supports text and background color from inline CSS, for `td` and `th` element 2017-06-23 11:28:17 +02:00
src Add option to suppress validation of sheet titles (#186) 2017-07-14 10:53:13 +02:00
tests Add option to suppress validation of sheet titles (#186) 2017-07-14 10:53:13 +02:00
.gitattributes Delete Build system 2016-08-26 18:11:03 +09:00
.gitignore Upgrade to PHP-CS-Fixer 2.0 2016-12-22 23:46:26 +09:00
.php_cs.dist Upgrade to PHP-CS-Fixer 2.1 2017-02-25 17:38:45 +09:00
.travis.yml Drop HHVM support 2017-07-14 10:09:25 +02:00
CHANGELOG.PHPExcel.md Split changelog not to confuse version numbers 2017-04-14 17:38:40 +09:00
CHANGELOG.md Add option to suppress validation of sheet titles (#186) 2017-07-14 10:53:13 +02:00
README.md Remove mention of bug in SQLite3 2017-04-14 17:27:54 +09:00
composer.json Refactor CachedObjectStorage to PSR-16 2017-04-14 16:56:27 +09:00
composer.lock Refactor CachedObjectStorage to PSR-16 2017-04-14 16:56:27 +09:00
license.md Added readme and license file 2012-07-05 07:24:57 +02:00
mkdocs.yml Workaround for RTD search 2017-05-05 11:56:18 +02:00
phpunit.xml.dist Drop support for PclZip 2017-03-11 11:48:46 +09:00

README.md

PhpSpreadsheet

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

Develop: Build Status Code Quality Code Coverage

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.6 or higher
  • PHP extension php_zip enabled
  • 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)
  • Helpful article about forking
  • Helpful article about pull requests

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

PhpSpreadsheet is licensed under LGPL (GNU LESSER GENERAL PUBLIC LICENSE)