I am completely new to openpyxl so, as you can imagine, I am having pretyy hard times when I try to make use of it.
I have an excel report that contains only one sheet
wb = load_workbook("report.xlsx")
ws = wb.active
abc_rows=[]
for row in range(2,ws.max_row+1):
if(ws[row][4]=='ABC'):
abc_rows.append(row)
To access the selected rows separately, further add this code
i=1
abc_dict={}
for row in ws.values:
if(i in abc_rows):
(a,b,c,d,e,f,g,h,i,j,k,l)=row
abc_dict[i]=row
i=i+1
To access selected rows seperately, use
abc_dict[2] gives entire second row as tuples and abc_dict[2][0] gives first cell value. you can parse till abc_dict[2][11] to get each cell of selected rows seperately.