Files
PhpSpreadsheet/samples/Basic/50_xlsverticalbreak.php
T
oleibman 6443416828 Xls Reader Vertical Break and Writer Page Order (#3306)
Fix #3055. Xls Reader can set vertical break specifying row 0, causing an exception. It is doubtful that Excel needs a row for a vertical break; code is changed to use row 1 if the input file specifies row 0 (or lower). Code in question has not been exercised in unit test suite. Similarly, code to set horizontal break (which probably does not have a bug) is not exercised in test suite. Finally, page order in Writer incorrectly uses value in opposite way that Reader does. A new sample is added to illustrate that these are all handled correctly; it is easier to verify this by visually comparing the source spreadsheet and the copy made from it. A unit test is also added for the same spreadsheet to formally assert that the 3 properties in question are both read and written correctly.
2023-01-20 17:33:19 -08:00

14 lines
318 B
PHP

<?php
require __DIR__ . '/../Header.php';
use PhpOffice\PhpSpreadsheet\Reader\Xls;
$helper->log('Read spreadsheet');
$reader = new Xls();
$spreadsheet = $reader->load(__DIR__ . '/../templates/50_xlsverticalbreak.xls');
// Save
$helper->write($spreadsheet, __FILE__, ['Xls']);
$spreadsheet->disconnectWorksheets();