I'm trying to add just one empty column into one sheet of an excel file. The excel file that I'm using has a specific structure that I can't change. That being said the column right after where I am trying to insert has a very small width. The code I have below will not insert the column before that small column and after a standard size column. But when I adjust the index to be in between 2 standard size columns there's no issue.
How can I fix my code to not have this issue inserting a column or are there better methods?
from openpyxl import load_workbook
workbook = load_workbook('file.xlsx')
sheet= workbook.worksheets[8]
sheet.inset_cols(185)
workbook.save(filename= 'file.xlsx')