最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python - openpyxl removes dropdown field - Stack Overflow

programmeradmin1浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论