### Read an Excel file with xlrd Source: https://xlrd.readthedocs.io This example demonstrates opening an .xls workbook, accessing sheet information, and reading cell values. ```python import xlrd book = xlrd.open_workbook("myfile.xls") print("The number of worksheets is {0}".format(book.nsheets)) print("Worksheet name(s): {0}".format(book.sheet_names())) sh = book.sheet_by_index(0) print("{0} {1} {2}".format(sh.name, sh.nrows, sh.ncols)) print("Cell D30 is {0}".format(sh.cell_value(rowx=29, colx=3))) for rx in range(sh.nrows): print(sh.row(rx)) ``` -------------------------------- ### Install xlrd via pip Source: https://xlrd.readthedocs.io Use this command to install the xlrd library in your Python environment. ```bash pip install xlrd ``` -------------------------------- ### Run xlrd command line utility Source: https://xlrd.readthedocs.io Use the runxlrd.py script to display the first, second, and last rows of each sheet in specified .xls files. ```bash python PYDIR/scripts/runxlrd.py 3rows *blah*.xls ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.