python - Creating a list from a .txt file to write on excel -
I am trying to create a list from a large series of data on my .txt file. I want to process them through Excel and show that I am doing this to create a recurrence list which will be written in every column. However, I get this error that I am not defining J.
import xlwt f = open ('inputfile.txt') for lines in C = 1: #split = f.split ('\ t') style0 = xlwt.easyxf (' Font: Name Times New Roman, Color Black, Bold On ') wb = xlwt.Workbook () ws = wb.add_sheet (' database ', cell_overwrite_ok = true) for i, line in enumerate (line): ws.write ( I, j, col) print (str (c) c = c + 1 wb.save ('prueba.xls') In addition, I would like to ask if this is possible
You have not defined the variable ( Instead you have additional variables Line which is unused here), you have to define the variable. For i, enumerate the line (line): You have to define j j, j, Call in the calculation (line) for:
Comments
Post a Comment