Open rumcais opened 1 year ago
The problem is that TIL about the existence of MS Excel's SERIES()
function.
At the moment, it simply doesn't exist in PhpSpreadsheet; but the graph uses it in a formula, and PhpSpreadsheet tries to evaluate that formula.
As a temporary solution (until we can implement SERIES()
and integrate it with Charts), you can disable the Calculation Engine before saving the file:
$writer = IOFactory::createWriter($spreadsheet, 'Xlsx');
$writer->setIncludeCharts(true);
$writer->setPreCalculateFormulas(false);
$writer->save('output.xslx');
Super. Thank you.
This is:
What is the expected behavior?
Should copy Charts if there exists.
What is the current behavior?
Error during generation if the graph is based on random rows.: PhpOffice\PhpSpreadsheet\Calculation\Exception Formula Error: Unexpected ,
What are the steps to reproduce?
Please provide a Minimal, Complete, and Verifiable example of code that exhibits the issue without relying on an external Excel file or a web server:
If this is an issue with reading a specific spreadsheet file, then it may be appropriate to provide a sample file that demonstrates the problem; but please keep it as small as possible, and sanitize any confidential information before uploading.
This template works https://ufile.io/3pkwv0xz This template is not working https://ufile.io/gktlbr4j