GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - python-excel/xlrd: Please use openpyxl where you can...

BranchesTags
Open more actions menu

Latest commit

 

History

512 Commits
512 Commits

Folders and files

NameName
Last commit message
Last commit date
.circleci
.circleci
 
 
docs
docs
 
 
scripts
scripts
 
 
tests
tests
 
 
xlrd
xlrd
 
 
.carthorse.yml
.carthorse.yml
 
 
.coveragerc
.coveragerc
 
 
.gitignore
.gitignore
 
 
.readthedocs.yml
.readthedocs.yml
 
 
CHANGELOG.rst
CHANGELOG.rst
 
 
LICENSE
LICENSE
 
 
MANIFEST.in
MANIFEST.in
 
 
README.rst
README.rst
 
 
setup.cfg
setup.cfg
 
 
setup.py
setup.py
 
 

Repository files navigation

xlrd

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.

Warning

This library will no longer read anything other than .xls files. For alternatives that read newer file formats, please see http://www.python-excel.org/.

Cell comments are available through Sheet.cell_note_map. Hyperlinks are available through Sheet.hyperlink_list and Sheet.hyperlink_map.

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.
  • 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

About

Please use openpyxl where you can...

www.python-excel.org/

Resources

Readme
License
Activity
Custom properties

Stars

2.2k stars

Watchers

93 watching

Forks

438 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.