I want to read Worksheets from a workbook using Python Wincom32 module but not able to read it if number of sheets are more. For Example i have an excel workbook with total 150 worksheets in it and i am trying to read 89th Excel worksheet using Python Wincom32 module but it is giving me some sheet name which is not present in the Excel Workbook at all. I am using below python code
import win32com.client
dispatch = win32com.client.Dispatch
excel = dispatch("Excel.Application")
excel.visible = 1
wb = excel.Workbooks.open('<PATH TO EXCEL>')
count = wb.Sheets.count # count stores total number of worksheets present
print count
ws_name = wb.Sheets[ 89 ].name
""" This is supposed to read the name of 89th Worksheet instead it is giving me some garbage
name """
print ws_name