When trying to use iter_rows I get an error saying that "Worksheet object has no attribute iter_rows". I have the latest version of both openpyxl (1.5.8) and python (2.7.3) using office 2003 on windows 7. I was using the snippet of code below when the error cropped up:
from openpyxl.reader.excel import load_workbook
from openpyxl.workbook import Workbook
import time, sys
***other code***
col_name = 'A'
start_row = 1
end_row = 99
range_expr = "{col}{start_row}:{col}{end_row}".format(
col=col_name, start_row=start_row, end_row=end_row)
for (time_cell,) in ws.iter_rows(range_string=range_expr):
print time_cell.value.hour
There isn't anything extra I have to import for this to work is there?