0
How to extract macros in Excel file in PHP or JS?
I found https://github.com/PHPOffice/PHPExcel/ but there is nothing about macros.
0
How to extract macros in Excel file in PHP or JS?
I found https://github.com/PHPOffice/PHPExcel/ but there is nothing about macros.
1
With PHPExcel you can read the file and get the VBAProject.bin
:
/**
* macrosCode : all macros code (the vbaProject.bin file, this include form, code, etc.), null if no macro
*
* @var binary
*/
private $macrosCode;
You'd need other tools to examine the contents of the VbaProject.bin
file.
E.g. using officeparser.py:
python officeparser.py macro.xlsm --extract-macros
INFO: Saving VBA code to ./ThisWorkbook.cls
INFO: Saving VBA code to ./Sheet1.cls
INFO: Saving VBA code to ./Sheet2.cls
INFO: Saving VBA code to ./Sheet3.cls