-
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?
Protected data is preserved and stays hidden like in version 1.17.1 and older.
What is the current behavior?
Protected data and hidden formulas become visible.
What are the steps to reproduce?
The source file only needs to be loaded and saved to break the protected data.
$srcFile = MAddPath(PrivateDocumentGlobal::getUploadFolderDisc(), self::$file);
$tmpFile = MAddPath($GLOBALS["web_root_disc"], "data/tmp", pathinfo(self::$file, PATHINFO_FILENAME) . "-prevyplneno." . pathinfo(self::$file, PATHINFO_EXTENSION));
$spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load($srcFile);
$writer = new PhpOffice\PhpSpreadsheet\Writer\Xlsx($spreadsheet);
$writer->save($tmpFile);Which versions of PhpSpreadsheet and PHP are affected?
PhpSpreadsheet 1.18.0 and PHP 7.4.14. Older versions of PhpSpreadsheet, which I have tested until 1.15.0, behave correctly.
Metadata
Metadata
Assignees
Labels
No labels