Answer the question
In order to leave comments, you need to log in
How to extract text from excel?
Guys how to pull out the text from the excel "I enter - full name and pulls the entire line"
from openpyxl import Workbook
from openpyxl import load_workbook
wb = load_workbook('test.xlsx')
ws1 = wb['Sheet1']
rows={}
dates = [int(x.value) for x in ws1.iter_rows(min_col=2,max_row=1).send(None)]
for row,name in enumerate([x.value for x in ws1.iter_cols(max_col=1,min_row=2).send(None)],2):
rows[name]={}
for col,date in enumerate(dates,2):
rows[name][date] = ws1.cell(row,col).value
print(rows['Olena Kosr'][29])
print(list(rows['Olena Kosr'].values()))
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question