for row in f:
    row_list.append(row.split('|'))
column_list = zip(*row_list)
workbook = xlwt.Workbook()
worksheet = workbook.add_sheet('Sheet1')
i = 0
for column in column_list:
    for item in range(len(column)):
        value = column[item].strip()
if is_number(value):
    worksheet.write(item, i, float(value), style=style)
else:
    worksheet.write(item, i, value)
i += 1
workbook.save(textfile.replace('.txt', '.xls'))
Automate conversion txt to xls