vormals Möllner Turnerschaft v. 1884

PHPSpreadsheet Bug Demo

This is a demonstration of a bug in PHPSpreadsheet (https://github.com/PHPOffice/PhpSpreadsheet/issues/3147).
Click 'Download Original File' button to get the original file.
Click 'Download Edited File' button to get a copy of the file that was altered by the following PHP code:
$inputFileName = dirname(__FILE__)."/PHPSpreadsheet_bugdemo_original.ods";
$spreadsheetReader = new PhpOffice\PhpSpreadsheet\Reader\Ods();
$objSpreadsheet = $spreadsheetReader->load($inputFileName);
$objSpreadsheet->setActiveSheetIndex(0)->setCellValue('A1', 'Where has my button gone?');
$objSpreadsheet->setActiveSheetIndex(0)->setCellValue('A2', 'Please open Tools --> Macros --> Edit Macros to prove the code is still there. (*.xls files only, *.ods will loose their scripts and cell formating inspite of using "$reader->setReadDataOnly(true);".');
$objWriter = PhpOffice\PhpSpreadsheet\IOFactory::createWriter($objSpreadsheet, 'Ods');
$objWriter->save('php://output');