-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Description
This is:
- [X] a bug report
- [ ] a feature request
- [X] **not** a usage question (ask them on https://stackoverflow.com/questions/tagged/phpspreadsheet or https://gitter.im/PHPOffice/PhpSpreadsheet)
What is the expected behavior?
The calculation should be valid. The "!" needs to be added to $invalidCharacters
or calculations needs to be updated to support exclamation mark characters in sheet titles.
What is the current behavior?
Uncaught PhpOffice\PhpSpreadsheet\Calculation\Exception: Title!!C1 -> Cell coordinate can not be zero-length string
What are the steps to reproduce?
<?php
require 'vendor/autoload.php';
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
$spreadsheet = new Spreadsheet();
$sheet = $spreadsheet->getActiveSheet();
$sheet->setTitle('Title!');
$sheet->fromArray([1, 2,'=SUM(A1:A2)']);
$writer = new Xlsx($spreadsheet);
$writer->save('hello world.xlsx');
Which versions of PhpSpreadsheet and PHP are affected?
all