PhpSpreadsheet icon indicating copy to clipboard operation
PhpSpreadsheet copied to clipboard

Macro Buttons and List boxes are removed

Open DeekshaPrabhub96 opened this issue 4 years ago • 2 comments

This is: I have an XLSM with buttons and list box (macros) when I am opening an XLSM file and updating a cell value with text and saving it as different file.

$spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load($filePath); $spreadsheet->getCalculationEngine()->suppressFormulaErrors=true; . . . $writer = new Xlsx($spreadsheet); $writer->save('output.xlsm');

In the new file buttons and list boxes are missing.

What is the expected behavior?

Button and List box should be present in the new file because we are saving the existing file with different name.

What is the current behavior?

Button and list box are removed.

Which versions of PhpSpreadsheet and PHP are affected?

1.19

DeekshaPrabhub96 avatar Nov 10 '21 09:11 DeekshaPrabhub96

same problem here

nicojmb avatar Feb 07 '22 14:02 nicojmb

PR #2455 addresses this problem. It is in draft status; it seems somewhat risky, and I don't have much in the way of worksheets to test on. Might you be able to test against that PR and see if it meets your needs?

oleibman avatar Feb 07 '22 16:02 oleibman