xxxxxxxxxx
import openpyxl
# Load the Excel file
workbook = openpyxl.load_workbook('example.xlsx')
# Select the desired sheet
sheet = workbook['Sheet1']
# Define the row and column where you want to insert the cell
row_num = 2 # Example row number
col_num = 3 # Example column number
# Insert a new cell at the specified position
sheet.insert_cols(col_num)
# Save the changes to the file
workbook.save('example.xlsx')