Skip to main content

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:

  • Charts, Macros, Pictures, any other embedded object, including embedded worksheets.

  • VBA modules

  • Formulas, but results of formula calculations are extracted.

  • Comments

  • Hyperlinks

  • Autofilters, advanced filters, pivot tables, conditional formatting, data validation

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

Quick start:

pip install xlrd
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

Metadata

Release files for xlrd 2.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xlrd 2.0.2
File Size Uploaded
xlrd-2.0.2.tar.gz 100.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for xlrd 2.0.2
File Interpreter ABI Platform
xlrd-2.0.2-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 196.7 kB

Release files / xlrd-2.0.2.tar.gz

Download URL xlrd-2.0.2.tar.gz
Size 100.2 kB
Tags Source
SHA-256 checksum
How to use checksums
08b5e25de58f21ce71dc7db3b3b8106c1fa776f3024c54e45b45b374e89234c9
BLAKE2b-256 checksum
How to use checksums
075a377161c2d3538d1990d7af382c79f3b2372e880b65de21b01b1a2b78691e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.9

Release files / xlrd-2.0.2-py2.py3-none-any.whl

Download URL xlrd-2.0.2-py2.py3-none-any.whl
Size 96.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
ea762c3d29f4cca48d82df517b6d89fbce4db3107f9d78713e48cd321d5c9aa9
BLAKE2b-256 checksum
How to use checksums
1a62c8d562e7766786ba6587d09c5a8ba9f718ed3fa8af7f4553e8f91c36f302
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.9

Release history Release notifications | RSS feed

This release

2.0.2 This release

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.9.4

2 release files

0.9.3

1 release file

0.9.2

1 release file

0.9.1

1 release file

0.9.0

1 release file

0.8.0

1 release file

0.7.9

3 release files

0.7.8

1 release file

0.7.7

1 release file

0.7.6

1 release file

0.7.5

1 release file

0.7.4

1 release file

0.7.3

1 release file

0.7.2

1 release file

0.7.1

4 release files

0.7.0

3 release files

0.6.1

2 release files

0.5.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page