python24版本的excel处理类库openpyxl 1.1.0
发布网友
发布时间:2022-06-09 12:47
我来回答
共1个回答
热心网友
时间:2023-10-01 19:25
from openpyxl.reader.excel import load_workbook
wb=load_workbook(r'd:\foo1.xlsx')
ws=wb.get_sheet_by_name('Bar')
ws.cell('A1').value= 'new_value'
# save the workbook to a new file to finish the editing
# but the style settings has been removed (such like font, color) in the new file
wb.save(r'd:\foo2.xlsx')
如果解决了您的问题请采纳!
如果未解决请继续追问