I try to fill in a xlsm template table with openpyxl and I had a problem with the drop down fields. The drop down fields that refence is on a other worksheet will be removed after saving the data. I have no idea how I can fix it.
import openpyxl
wb = openpyxl.load_workbook("test_new.xlsm", read_only=False, keep_vba=True)
ws = wb.worksheets[1]
wb.save("Test.xlsm")
The test_new.xlsm has 2 workSheets one with a dropdown menu and the other one with the list data.
After saving to a new file the dropdown menu is removed.