You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a excel macro enabled workbook with custom macros. Our users can access a website and a there is a download process which populates the sheets of the workbook with data and downloads the complete book.
What is the expected behavior?
When writing to a xlsm workbook with empty sheets, the original macro's should remain after writing the file.
What is the current behavior?
It seems the original macro VBA details are getting stripped from the file when it's written to the php:output stream
What are the steps to reproduce?
See the code below
<?php// load the workbook$spreadsheet = PhpOffice\PhpSpreadsheet\IOFactory::load("BHAA.Race.Master.xlsm");
// create a writer instance$writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($spreadsheet, "Xlsx");
// set the headersheader("Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
header("Content-Disposition: attachment; filename=05featuredemo.xlsm");
header("Pragma: no-cache");
header("Expires: 0");
// write to the output stream$writer->save('php://output');
Which versions of PhpSpreadsheet and PHP are affected?
PhpSpreadsheet: dev-develop
PHP: 5.6.30
The text was updated successfully, but these errors were encountered:
I have a excel macro enabled workbook with custom macros. Our users can access a website and a there is a download process which populates the sheets of the workbook with data and downloads the complete book.
What is the expected behavior?
When writing to a xlsm workbook with empty sheets, the original macro's should remain after writing the file.
What is the current behavior?
It seems the original macro VBA details are getting stripped from the file when it's written to the php:output stream
What are the steps to reproduce?
See the code below
Which versions of PhpSpreadsheet and PHP are affected?
PhpSpreadsheet: dev-develop
PHP: 5.6.30
The text was updated successfully, but these errors were encountered: