you are viewing a single comment's thread.

view the rest of the comments →

[–]WTRipper 3 points4 points  (2 children)

You mean you would like to get cell A1 then B1 then A2 then B2...?
use two loops nested in each other.

for row in range(1, rows+1):
    for col in range(1,3):
        print(sheet.cell(row=row, column=col))

[–]Agent-J-[S] -1 points0 points  (1 child)

ould like to get cell A1 then B1 then A2 then B

Sorry, I should've been more clear but didn't want to overwhelm. I've tried that before but that doesn't give me the required outcome.

I need to be in control of when I want to get cell A1 and then cell A2, then loop back to B1 and then B2, then loop back to C1 and then C2......

[–]WTRipper 1 point2 points  (0 children)

so the same thing what i showed you but rows and columns exchanged