I'm trying to map all VBA codes I've in some excel in the office.
In my job, we have more than two hundred excel files, with a lot of macro in each. How can I extract the code text of some module?
I've see something like
workbook = excel.Workbooks.Open("{}{}.xlsm".format(path, file), True, True)
for i in workbook.VBProject.VBComponents:
print(i.Name)
Return
Plan1
Plan2
Main
Plan5
Plan3
Plan4
Sheet1
How can I get the VBA code in these Modules?
The solution could be in VBA or in Python