Y.G. Bae (30) [Avatar] Offline
#1
Hello.

I feel that the example should select the active sheet after loading the workbook by using the following statement:
ws = wb.active


Therefore, the example would be as below:
>>> from openpyxl import load_workbook
>>> wb = load_workbook('temp_data_01.xlsx')
>>> ws = wb.active
>>> results = []
>>> for row in ws.iter_rows():
...     results.append([cell.value for cell in row])
...
>>> print(results)


Thank you.

Best regards,
Y.G.
naomi.ceder (108) [Avatar] Offline
#2
Absolutely right. Thanks for catching these.

Cheers,
Naomi
Y.G. Bae (30) [Avatar] Offline
#3
I am glad to be of help. smilie