To view the list of sheets in an Excel spreadsheet, I can use the xlrd module within the Python script below to obtain the list of worksheets within the workbook.
#!/usr/bin/python
import xlrd as xl
file_name = raw_input("File: ")
workbook = xl.open_workbook(file_name)
print workbook.sheet_names()If I use the script to display the list of worksheets in a workbook
named report.xlsx that has three sheets named alpha,
beta, and gamma, I would see the following output:
$ ./sheetlist.py File: report.xlsx [u'alpha', u'beta', u'gamma'] $
[ More Info ]
