excel
code
#coding=utf- import os.path
import os
from openpyxl.reader.excel import load_workbook # excel文件绝对路径
file_home = "./xls/modify/name.xlsx"
wb = load_workbook(filename=file_home) # 打开excel文件
sheet_ranges = wb['sheet1']
#print(sheet_ranges['A1'].value) # 打印A1单元格的值
ws = wb['sheet1'] # 根据Sheet1这个sheet名字来获取该sheet
# 修改小明的出生日期
ws['b3'] = 'hello world1'
ws['s3'] = 'hello world2'
wb.save(file_home) # 保存修改后的excel