import openpyxl
wb = openpyxl.load_workbook("D:\村数据\实验.xlsx") ws = wb["Sheet1"]
ws.insert_rows(3)#插入行 ws.insert_cols(4)#插入列
wb.save("D:\村数据\实验.xlsx")