import xlrd
from xlutils.copy import copy
#打开指定 excel
wb = xlrd.open_workbook("excel 01.xlsx")
#复制 excel
wb2 = copy(wb)
#选择 sheet
sh = wb2.get_sheet(0)
sh.write(1,0,"DC")
sh.write(1,1,"batman")
sh.write(0,2,"100")
sh.write(1,2,"150")
#add sheet
sh2 = wb2.add_sheet("summary")
count=0
rs = wb.sheet_by_index(0)
for i in range(1,rs.nrows):
num = rs.cell_value(i,2)
count += num
sh2.write(0,0,'total')
sh2.write(0,1,count)
#保存 excel
wb2.save("excel 01 (2th version)")

老师,为什么修改过的新文件不能用 office viewer 读取?