把读取excel数据写入到另一个excel内容

import xlrd
import xlwt

xls = xlrd.open_workbook(‘E:/11/人员匹配查找.xls’)
table = xls.sheet_by_index(0)

new_workbook = xlwt.Workbook()
worksheet = new_workbook.add_sheet(‘new_test’)

for i in range(0, 10):
# worksheet.write(i, 0, table.cell_value(i,1))
j = table.cell_value(i, 1)
worksheet.write(i, 0, j)
print(table.cell_value(i, 1))
new_workbook.save(‘e:/11/33.xls’)

你可能感兴趣的:(python)