Insert column using openpyxl
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm working on a script that modifies an existing excel document and I need to have the ability to insert a column between two other columns like the VBA macro command .EntireColumn.Insert . Is there any method with openpyxl to insert a column like this? If not, any advice on writing one? 回答1: Haven't found anything like .EntireColumn.Insert in openpyxl. First thought coming into my mind is to insert column manually by modifying _cells on a worksheet. I don't think it's the best way to insert column but it works: from openpyxl .