123456789import pandas as pdimport xlwings as xwapp = xw.App(add_book=False)wb = app.books.open(name+'\\Rshimmer\\制价\\规范\\表\\1-沪天.xlsx')sht = wb.sheets.activesht.range('A40').options(index=True).value = dfwb.save(name+'\\Rshimmer\\制价\\规范\\表\\1-沪天.xlsx')app.quit()