import win32com.client as win32
excel = win32.gencache.EnsureDispatch('Excel.Application')
wb = excel.Workbooks.Open('2.xlsx')
ws = wb.Worksheets("Лист1")
for f_nom, xx in enumerate(ws.Rows):
if f_nom < 9: continue
elif f_nom > 66: break
else:
xx.AutoFit()
# ws.Rows.AutoFit() для всех строк
wb.SaveAs('row_height.xlsx')
excel.Application.Quit()