xlrd (original) (raw)

Project description

Build Status Coverage Status Documentation PyPI version

xlrd is a library for reading data and formatting information from Excel files in the historical .xls format.

The following are also not supported but will safely and reliably be ignored:

Password-protected files are not supported and cannot be read by this library.

Quick start:

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))

From the command line, this will show the first, second and last rows of each sheet in each file:

python PYDIR/scripts/runxlrd.py 3rows *blah*.xls

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

File details

Details for the file xlrd-2.0.1.tar.gz.

File metadata

File hashes

Hashes for xlrd-2.0.1.tar.gz | Algorithm | Hash digest | | | ----------- | ---------------------------------------------------------------- | | | SHA256 | f72f148f54442c6b056bf931dbc34f986fd0c3b0b6b5a58d013c9aef274d0c88 | | | MD5 | ae3f951c857a490d432f0a7d722352bf | | | BLAKE2b-256 | a6b319a2540d21dea5f908304375bd43f5ed7a4c28a370dc9122c565423e6b44 | |

See more details on using hashes here.

File details

Details for the file xlrd-2.0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for xlrd-2.0.1-py2.py3-none-any.whl | Algorithm | Hash digest | | | ----------- | ---------------------------------------------------------------- | | | SHA256 | 6a33ee89877bd9abc1158129f6e94be74e2679636b8a205b43b85206c3f0bbdd | | | MD5 | 5396ec15eeb7e38a5e73e25451ff7a9e | | | BLAKE2b-256 | a60cc2a72d51fe56e08a08acc85d13013558a2d793028ae7385448a6ccdfae64 | |

See more details on using hashes here.