I am wondering to use xlsxwriter to control my excel sheet instead of using old fashioned way by using VBA. I need a button to trigger some actions. What I read from the official documentation is
workbook.add_vba_project('./vbaProject.bin')
worksheet.insert_button('B3', {'macro': 'say_hello',
'caption': 'Press Me'})
I don't know how to define my own function as a macro and I don't know how to generate "vbaProject.bin". Is there anyway to write a macro in format like python function and directly assign it to the button?
If I must include the macro in vbaProject.bin, how can I do that? Hope it is not something like vba.