Open roland-jungwirth opened 9 months ago
Unable to duplicate. When I load and save the spreadsheet to a new file, the chart is in B24, as expected. I am, admittedly, running from the command line rather than a web server, but I do not see why that should matter.
You do not seem to be specifying includeCharts
on the writer, but that would cause the chart to be omitted from the output file, not moved to a different location.
I omitted includeCharts by accident - it definitely shows in the output. It might be due to a different version of phpspreadsheet?
This is:
What is the expected behavior?
If I read a spreadsheet with a chart, I expect the chart to be in the same position when I output the spreadsheet.
What is the current behavior?
The chart is in B24, but - after I have read and output it - it is in D13.
Additional background
I was trying to insert some rows and noticed that the chart was not being moved down, although this is the standard behaviour for Excel (reproduce: open the attached test.xlsx, mark lines 20-22, right click, click "Insert"). During my testing this issue came up.
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.
What features do you think are causing the issue
Does an issue affect all spreadsheet file formats? If not, which formats are affected?
Only tested with xlsx.
Which versions of PhpSpreadsheet and PHP are affected?
PHP 8.1, PhpSpreadsheet: whatever this version is: https://github.com/PHPOffice/PhpSpreadsheet/issues/3767
test.xlsx