How to add a python generated macro-script to an excel-file by xlsx-writer module?
Clash Royale CLAN TAG#URR8PPP
How to add a python generated macro-script to an excel-file by xlsx-writer module?
I have a python script, which generates a vba written macro variable for excel. A preview of the variable looks kind like this:
macro = """Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
...
End Sub"""
In my python script I'm create a workbook with the xlsxwriter module and I would like to add this macro to my workbook within the python script. Does somebody know further information about this issue?
I've already tried it with workbook.add_vba_project('./vbaProject.bin')
, but it isn't working until now.
workbook.add_vba_project('./vbaProject.bin')
vbaProject.bin
vba_extract.py
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
How did you extract the
vbaProject.bin
? Did you usevba_extract.py
– Siddharth Rout
Aug 6 at 16:19