def xls_tsv():
workbook = xlrd.open_workbook('aa.xlsx')
table = workbook.sheet_by_index(0)
with open('bb.tsv', 'w', encoding='utf-8', newline='') as f:
write = csv.writer(f,delimiter='\t')
for row_num in tqdm(range(1, table.nrows)):
# 每一行指定列索引,(9,12)为列起止索引,不填默认全选
row_value = table.row_values(row_num, 9, 12)
# 找到要写入tsv的目标
mention = row_value[0]
cui = row_value[2]
write.writerow([mention,cui])
wrirerow()中必须是可迭代对象,list格式