Use Python to read and write Excel files
Read Excel
1 2 3 |
book = pd.ExcelFile('./数据绘图.xlsx') sheet = book.parse(sheet_name='结果展示',usecols=np.arange(0,4),skiprows=np.arange(0,30),index_col=0) |
Write Excel
1 2 3 4 5 |
wtr = pd.ExcelWriter(path=YOUR_FILE_DIR,engine='openpyxl',mode='a') wtr = pd.ExcelWriter(path=f,engine='openpyxl',mode='a') sheet2.to_excel(excel_writer=wtr, sheet_name='结果展示', startrow=40, startcol=8) wtr.save() wtr.close() |