-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Description
This is:
- a bug report
What is the expected behavior?
Xlsx file should be opened with no issue.
What is the current behavior?
Corrupted Xlsx when Drawing inserted to page with printing settings.
What are the steps to reproduce?
Create empty Xlsx file, define printing settings like the screenshot.
The code below behaves different:
- if there are no printing settings - file is ok, image inserted successfully
- if there is some printing setting like 1-page-width - MS office opens file with warning
$book = PhpOffice\PhpSpreadsheet\IOFactory::load('1.xlsx');
$image = new PhpOffice\PhpSpreadsheet\Worksheet\Drawing();
$image->setPath('1.jpg')->setCoordinates('F10')->setHeight(50);
$image->setWorksheet($book->getActiveSheet());
$writer = new PhpOffice\PhpSpreadsheet\Writer\Xlsx($book);
$writer->save('2.xlsx');Which versions of PhpSpreadsheet and PHP are affected?
1.14, 1.13
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
