-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Description
This is:
- [x] a bug report
- [ ] a feature request
- [ ] **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 Function should either retain it's original calculated value or recalculate
What is the current behavior?
the function returns "#VALUE!"
What are the steps to reproduce?
Use phpspreadsheet to open the file: test.xlsx
this file include a cell function
=CONCATENATE("Prefix ",MID(CELL("filename"),FIND("]",CELL("filename"))+1,255), " Suffix")
Then use phpspreadsheet to output the file; creating a new file. The newly output file will show the formula as un-calculated. (there may be some other requirements but the behavior can be observed in the included simplified example)
ouput.xlsx produced by phpspreadsheet:

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:
<?php
require __DIR__ . '/vendor/autoload.php';
$sheetReader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader('Xlsx');
$sheetReader = $sheetReader->load('test.xlsx');
$sheetWriter = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($sheetReader, 'Xlsx');
header('Content-Type: application/vnd.ms-excel');
header("Content-Disposition: attachment; filename=\"output.xlsx\"");
$sheetWriter->save('php://output');Which versions of PhpSpreadsheet and PHP are affected?
This was observed on php 7.4 and phpspreadsheet 1.21.0
Metadata
Metadata
Assignees
Labels
No labels
