2
Hello I have a list I get from a file xls
through the library xlrd
workbook = xlrd.open_workbook(r"C:\Users\Expedição\Videos\CSV\produtos_filtrado.xls") # Escolhe o arquivo a ser lido.
worksheet = workbook.sheet_by_index(0) #Escolha a aba a ser lida.
for i in range(1,worksheet.nrows): #itere sobre os itens da aba
lista = worksheet.row(i)
print(lista)
the result of print
:
[text:'2746', text:'8512.20.21', text:'2 - Estrangeira - Adquirida no mercado interno, exceto a indicada no código 7', text:'SL-121410', text:'6949999876781']
[text:'2747', text:'8512.20.21', text:'2 - Estrangeira - Adquirida no mercado interno, exceto a indicada no código 7', text:'SL-121410CR', text:'6949999876798']
[text:'2794', text:'8512.20.21', text:'2 - Estrangeira - Adquirida no mercado interno, exceto a indicada no código 7', text:'SL-121510', text:'6949999876811']
[text:'2795', text:'8512.20.21', text:'2 - Estrangeira - Adquirida no mercado interno, exceto a indicada no código 7', text:'SL-043210', text:'6949999876804']
as it is possible to observe there is a text:
before the data I need, my question is how to remove this text:
?
I only have a doubt that for leaves the last value in the list? knows why?
– user198451
Hmmm, I based on your example, I made an edit on the answer and now it solves the problem.
– Giovanni Nunes
Now I understand thank you very much
– user198451