I\'ve read the API docs for xlwings, and played around with Workbook and Sheet objects in the interpreter, but I can\'t figure out how to call a macro from Python.
H
I got issues when I updated xlwings to 0.9+ version. To run vba macro with xlwings, I used the code written below for running macros inside the personal workbook (PERSONAL.XLSB). The updated code no2 of Felix didn't work for me, for macro inside the personal workbook.
import xlwings
wb = xw.Book(excel_file_path)
app = wb.app
# into brackets, the path of the macro
macro_vba = app.macro("'PERSONAL.XLSB'!my_macro")
macro_vba()
Hope it will help.