0

I want take all values from a row in excell...

for one specific cell i use:

c=5
cell= wsact.cell(row = 9, column = c) 
print(cell.value)

and i take value for cell in 9 row and 5 column. If i want take all values for the first 10 columns i use:

c=1
while c<=10:
    cell= wsact.cell(row = 9, column = c) 
    print(cell.value)
    c=c+1

and i take :

File "makelist.py", line 23 cell= wsact.cell(row = 9, column = c) ^ IndentationError: expected an indented block

what am I doing wrong?

Zhubei Federer
  • 1,274
  • 2
  • 10
  • 27
dimzev
  • 171
  • 9

1 Answers1

0

You need to indent everything below the while statement:

c=1
while c<=10:
    cell= wsact.cell(row = 9, column = c) 
    print(cell.value)
    c=c+1
7koFnMiP
  • 472
  • 3
  • 17