import xlwt
wbk = xlwt.Workbook()
sheet = wbk.add_sheet('python')
row = 0
f = open('newfile.txt')
for line in f:
L = line.strip().split()
for i,c in enumerate(L):
sheet.write(row,i,c)
row += 1
wbk.save('examp1.xls')
in this code it is inserted into columns but each column gets iterating not in the same row
newfile.txtand what you are getting? and what you expected?