我正在使用 python 2.7 我试过这样
from xlrd import *
from xlwt import *
file1 = r"abc.xls"
wbfile1 = open_workbook(file1)
file2 = r"xyz.xls"
wbfile2 = Workbook()
SheetName_file2 = wbfile2.add_sheet('sheet1',cell_overwrite_ok=True)
SheetName_file2.write(10,10,"Overwrite cell")
wbfile2.save(file2)
如果我运行它,则 sheet1 的单元格(10,10)将更改为Overwrite cell
并删除剩余的单元格。有什么办法可以让所有细胞不受影响?