I am trying to add a vba_project to "Sheet1" of a workbook using python.
I am following XLSXWRITER documentation to get the bin of the VBA code from a different sheet which I would want to use in "Sheet1" of my new workbook.
I enter the below code in command prompt but I get the error: "'vba_extract.py' is not recognized as an internal or external command"
$ vba_extract.py Book1.xlsm
You have to tell the cmd you're running a python file.
Try this batch code:
cd C:\path\of\yourfile.py python vba_extract.py Book1.xlsm
edit: Added cd command, you have to be in the folder of the python file.