Friday, 9 August 2013

Loop through multiple workbooks with different lengths?

Loop through multiple workbooks with different lengths?

I have some code to loop through multiple workbooks:
wb = load_workbook(fileName)
for curTitle in wb.worksheets:
ws = wb.get_sheet_by_name(name = curTitle.title)
for row in ws.range('A1:C100'):
for cell in row:
#Do Something
However the range is different in every worksheet. Is there a way to get
the last row that has data?

No comments:

Post a Comment