I would like some help to add a macro in an .xlsx file. I know that's not a good type of file, it should be an .xlsm file, but I have found Excel::Writer::XLSX
in Perl that can add a macro to a new .xlsx file.
I want to open an existing .xlsx file (maybe with Excel::Reader::XLSX
) and add vbaProject.bin
into this file and save it (maybe as .xlsm). It has a function "add_vba_project()"
but on Excel::Writer::XLSX
which can't open existing file.
Has anyone found a solution in Perl or Python or PHP (PHPExcel for example) with or without vbaProject.bin
?