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') How did you extract the vbaProject.bin ? Did you use vba_extract.py – Siddharth Rout Aug 6 at 16:19 vbaProject.bin vba_extract.py By clicking "Post Your Answer", you acknowledge that you have read our updated terms of s...