openpyxl - Update .xlsm file values python -
i have .xlsm file reference template. want update values of .xlsm file using python .csv file.
template .xlsm ----> update values using .csv
what has not worked : tried using pandas.to_excel method. .xlsm file gets corrupted after write sheet.
could please point me in right direction ?
openpyxl supports xlsm file.
from openpyxl import load_workbook wb2 = load_workbook('test.xlsm') update(wb2, csvfile.csv) # need work according need. wb.save() wb.close()
Comments
Post a Comment