0
Take a look at this link... Your code will look like the one below:
import xlrd
workbook = xlrd.open_workbook('teste.xls') #Use o nome do seu arquivo
worksheet = workbook.sheet_by_name('Planilha1') #Use o nome da aba do seu arquivo
worksheet = workbook.sheet_by_index(0)
lista = [] # Cria a lista vazia
for i in range(worksheet.nrows):
valor = worksheet.cell_value(i, 0) # Pega os valores do excel
lista.append(valor) # Insere os valores na lista
print(lista)
- You can use the xlrd library to read the file.
- Create an empty list
- Use append to include items in your list
Remember that with this code Voce will catch even the value of the first line. Modify your code to what Voce needs.