change value in excel in python

Solutions on MaxInterview for change value in excel in python by the best coders in the world

showing results for - "change value in excel in python"
Simone
08 Jan 2021
1from xlrd import open_workbook
2from xlutils.copy import copy
3
4xl_file = r'D:\path\excel.xls'
5rb = open_workbook(xl_file)
6wb = copy(rb)
7sheet = wb.get_sheet(0)
8sheet.write(0,2,'New_Data_For_Cell')
9wb.save(xl_file)