1
My code goes through all cells in my spreadsheet and returns all the values I need, and in this.xls file there is only one tab.
Now I have a new file to go through and are 8 tabs. I know I need to initialize with:
workbook_r = open_workbook('arquivo.xls', formatting_info=True)
worksheet_r = workbook_r.sheet_by_index(0)
Where on this second line I am setting the tab at 0. How do I go through more than one tab in the entire file? No error, it just doesn’t read the next tab. I couldn’t find any reference in the xlrd library documentation to read more than one tab.
Have you tried the
sheet_by_name
or maybe justsheets()
? (that should return you an array of tabs) Note: I also did not find any documentation, only this blog post (in English). I have no experience with this library.– mgibsonbr
Hi, yes. The sheet_by_name is in case I gave prefer by the name of the tab, rather than the position. And only Sheets() not right, because there is no.
– Mary Tortugo