a5a0268050
Fixes a bug when doing a HLOOKUP on a single row. ```php <?php require 'vendor/autoload.php'; use PhpOffice\PhpSpreadsheet\Spreadsheet; $spreadsheet = new Spreadsheet(); $sheet = $spreadsheet->getActiveSheet(); /** * Single row. */ $singleRow = "=HLOOKUP(10, {5, 10, 15}, 1, 0)"; $sheet->getCell('A1')->setValue($singleRow); // Should echo 10, but echos '#N/A' and some PHP notices and warnings. echo $sheet->getCell('A1')->getCalculatedValue() . PHP_EOL; /** * Multiple rows. */ $multipleRows = "=HLOOKUP(10, {5, 10, 15; 20, 25, 30}, 1, 0)"; $sheet->getCell('A2')->setValue($multipleRows); // Should echo: 10 and also does. echo $sheet->getCell('A2')->getCalculatedValue() . PHP_EOL; ``` Co-authored-by: Mark Baker <mark@lange.demon.co.uk> |
||
---|---|---|
.github | ||
bin | ||
docs | ||
samples | ||
src/PhpSpreadsheet | ||
tests | ||
.gitattributes | ||
.gitignore | ||
.php_cs.dist | ||
.scrutinizer.yml | ||
.travis.yml | ||
CHANGELOG.PHPExcel.md | ||
CHANGELOG.md | ||
CONTRIBUTING.md | ||
LICENSE | ||
README.md | ||
composer.json | ||
composer.lock | ||
mkdocs.yml | ||
phpunit.xml.dist |
README.md
PhpSpreadsheet
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.
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.