A pure PHP library for reading and writing spreadsheet files
Go to file
Mark Baker a911e9bb7b
Calculation engine empty arguments (#2143)
* Initia work on differentiating between empty arguments and null arguments passed to Excel functions

Previously we always passed a null value for an empty argument (i.e. where there was an argument separator in the function call without an argument.... PHP doesn't support empty arguments, so we needed to provide some value but then it wasn't possible to differentiate between a genuine null argument (either a literal null, or a null cell value) and the null that we were passing to represent an empty argument value.

This change evaluates empty arguments within the calculation engine, and instead of passing a null, it reads the signature of the required Excel function, and passes the default value for that argument; so now a null argument really does mean a null value argument.

* If the Excel function implementation doesn't accept any arguments; or once we reach a variadic argument, or try to pass more arguments than the method supports in its signature, then there's no point in checking for defaults, and to do so will lead to PHP errors, so break out of the default replacement loop
2021-06-10 08:49:53 +02:00
.github Update phpDocumentor 2021-06-02 23:08:02 +09:00
bin Move documentation builder to infra so that it isn't included in non `--dev` composer downloads 2021-05-28 22:35:37 +02:00
docs Reader writer flags (#2136) 2021-06-04 13:45:32 +02:00
infra Fix more phpcs issues 2021-05-28 22:35:37 +02:00
samples Reader XML Properties - Eliminate strtotime (#2134) 2021-05-31 11:04:07 +02:00
src/PhpSpreadsheet Calculation engine empty arguments (#2143) 2021-06-10 08:49:53 +02:00
tests Calculation engine empty arguments (#2143) 2021-06-10 08:49:53 +02:00
.gitattributes Additional language data, and improved automated build of translation files for Calculation Engine locale 2021-05-20 20:41:09 +02: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 Reader writer flags (#2136) 2021-06-04 13:45:32 +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 Additional language data, and improved automated build of translation files for Calculation Engine locale 2021-05-20 20:41:09 +02:00
composer.lock Resolve default values when a null argument is passed for HLOOKUP(), VLOOKUP() and ADDRESS() functions 2021-05-27 12:02:38 +02:00
mkdocs.yml Make Documentation Updates Easier and More Accurate (#1573) 2021-02-15 20:50:20 +01:00
phpstan-baseline.neon Reader writer flags (#2136) 2021-06-04 13:45:32 +02:00
phpstan.neon.dist Avoid memory leak by releasing image resources 2021-05-16 12:39:09 +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.