# 导入模块
from openpyxl import load_workbook
from openpyxl.styles import Font
# 获取数据
path='./material/江宇工资信息表.xlsx'
path_result='./material/江宇工资信息表_result.xlsx'
wb = load_workbook(path)
ws = wb.active
performance = ws['E2'].value
bonus = ws['F2'].value
base = ws['G2'].value
# 使用数据
salary = performance + bonus + base
# 输出结果
ws['H1'].value = '总工资'
ws['H1'].font=Font(name='宋体',size=16,bold=True)
ws['H2'].value = salary
wb.save(path_result)