我想尝试同时复制和编写excel表。有可能吗?
sheet0表示我想复制excel表
sheet1表示我想将文本文件转换为excel文件
sheet2表示我只打印一些值到excel
import glob
import xlwt
import xlrd
from xlutils.copy import copy
openFile = 'D:/workspace/list/*.txt'
rb = xlrd.open_workbook('C:/users/desktop/list.xls')
....
for filename in glob.glob(openFile):
wb = xlwt.Workbook(encoding="latin1")
wb = copy(rb)
sheet0 = wb.get_sheet(0)
sheet1 = wb.add_sheet('INPUT')
sheet2 = wb.add_sheet('VALUE')
....
wb.save("newTest.xls")