-
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 Printing configuration should be kept after saving the document.
What is the current behavior?
When the printing area does not start on the first column, the page breaks disappears or ar return to automatic ones.
What are the steps to reproduce?
This simple code allows to test the case, it just opens the file and save it without modification.
The area_ko.xlsx gives the following result (left is the original file, right is after opening and saving it with PhpSpreadsheet.)

The area.xlsx file is the same case just with the printing area set to start on the first column, and works as expected

<?php
require __DIR__ . '/vendor/autoload.php';
// Load the file
$xlsxReader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader('Xlsx');
$workbook = $xlsxReader->load('area.xlsx');
//$workbook = $xlsxReader->load('area_ko.xlsx');
// Save the file
$writer = new \PhpOffice\PhpSpreadsheet\Writer\Xlsx($workbook);
$writer->save('result.xlsx');What features do you think are causing the issue
- Reader
- Writer
- Styles
- Data Validations
- Formula Calculations
- Charts
- AutoFilter
- Form Elements
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels