How can I iterate over worksheets in win32com?
问题 I generate an xlsx file with lots of sheets and I want to take me at specific position when I open it manually with Excel. This function does the job but for one sheet only. How can I apply it to all of the sheets in workbook? import win32com.client def select_cell(): xl = win32com.client.gencache.EnsureDispatch('Excel.Application') wb = xl.Workbooks.Open(r'H:\Files\1.xlsx') ws = xl.ActiveSheet ws.Range('B100').Select() wb.Close(True) xl.Quit() select_cell() I want to make something like this