A pure PHP library for reading and writing spreadsheet files
Go to file
oleibman 346bad1b1d
Fix for Issue 2042 (SUM Partially Broken) (#2045)
As issue #2042 documents, SUM behaves differently with invalid strings depending on whether they come from a cell or are used as literals in the formula. SUM is not alone in this regard; COUNTA is another function within this behavior, and the solution to this one is modeled on COUNTA. New tests are added for SUM, and the resulting tests are duplicated to confirm correct behavior for both cells and literals.

Samples 16 (CSV), 17 (Html), and 21 (PDF) were adversely affected by this problem. 17 and 21 were immediately fixed, but 16 had another problem - Excel was not interpreting the UTF8 currency symbols correctly, even though the file was saved with a BOM. After some experimenting, it appears that the `sep=;` line generated by setExcelCompatibility(true) causes Excel to mis-handle the file. This seems like a bug - there is apparently no way to save a UTF-8 CSV with non-ASCII characters which specifies a non-standard separator which Excel will open correctly. I don't know if this is a recent change or if it is just the case that nobody noticed this problem till now. So, I changed Sample 16 to use setUseBom rather than setExcelCompatibility, which solved its problem. I then added new tests for setExcelCompatibility, with documentation of this problem.
2021-05-03 18:31:01 +02:00
.github Introduce PHPStan 2021-04-03 16:13:21 +09:00
bin Keep sample bootstrap purely in samples 2020-05-17 18:51:13 +09:00
docs First steps in the implementation of AutoFilters for ODS Reader and Writer (#2053) 2021-05-02 22:00:48 +02:00
samples Fix for Issue 2042 (SUM Partially Broken) (#2045) 2021-05-03 18:31:01 +02:00
src/PhpSpreadsheet Fix for Issue 2042 (SUM Partially Broken) (#2045) 2021-05-03 18:31:01 +02:00
tests Fix for Issue 2042 (SUM Partially Broken) (#2045) 2021-05-03 18:31:01 +02:00
.gitattributes Remove leftover of Sami 2021-02-02 15:16:03 +09:00
.gitignore Make Documentation Updates Easier and More Accurate (#1573) 2021-02-15 20:50:20 +01:00
.php_cs.dist PHPStan Level 2 2021-04-04 22:06:00 +09:00
.phpcs.xml.dist Move phpcs config to file 2020-07-26 14:48:06 +09:00
.scrutinizer.yml Scrutinizer wait shorter for coverage 2020-05-25 11:20:08 +09:00
CHANGELOG.PHPExcel.md Prefer https:// URLs when available in docs & comments 2018-10-28 13:55:00 +11:00
CHANGELOG.md First steps in the implementation of AutoFilters for ODS Reader and Writer (#2053) 2021-05-02 22:00:48 +02:00
CONTRIBUTING.md Document release process 2021-03-30 10:11:46 +09:00
LICENSE Change license from LGPL 2.1 to MIT 2019-11-17 18:08:34 +01:00
README.md Drop Travis 2020-11-26 11:10:52 +09:00
composer.json Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
composer.lock Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
mkdocs.yml Make Documentation Updates Easier and More Accurate (#1573) 2021-02-15 20:50:20 +01:00
phpstan-baseline.neon Ods defined names unit tests (#2054) 2021-05-03 08:39:42 +02:00
phpstan.neon.dist Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
phpunit.xml.dist Use current PHPUnit configuration xsd 2020-05-17 18:38:49 +09:00

README.md

PhpSpreadsheet

Build Status Code Quality 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.

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.

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.