I am using python 3.8.1 on a mac and am trying to create a .xlsm
file from scratch. I have looked at openpyxl and xlsxwriter, both of them are able to create .xlsx
files from scratch and both can edit existing .xlsm
files but I can't find any thing about actually creating a .xlsm
file from scratch.
I've looked over the openpyxl documentation here and the xlsxwriter documentation here but I have not been able to find anything about how to create a .xlsm
file from scratch. I can't even find anything about how to convert a .xlsx
file to an .xlsm
file.
The closest I have come is that you can use vba_extract.py
which is included in xlsxwriter to extract a file named vbaProject.bin
from an existing .xlsm
file which you can then add to a .xlsx
file and then you can save it as a .xlsm
file, but I need to create a .xlsm
file from scratch, not relying on having some file there to use to create it.
Is there anything out there with openpyxl, xlsxwriter or any other utility I can use with python 3.8.1 to create a .xlsm
file from scratch without having to depend on having an existing .xlsm
or a vbaProject.bin
file? As always a correct, clearly explained answer will be marked as accepted and will be upvoted.