xlrd

A Python library for extracting data and formatting from legacy Excel .xls spreadsheet files

Library
PyPI
v2.0.2
2,206stars
BSD 3-Clause License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
59/100Fair
Development Activity44
Maintenance12
Community80
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
64/100Good
Architecture70
Code Quality68
Innovation45
Learning Curve72

xlrd is a library for developers to extract data, formatting information, and workbook structure from Microsoft Excel’s legacy binary .xls spreadsheet format. It has been scoped down deliberately: as of its README, xlrd no longer reads the newer .xlsx format at all, pointing users toward openpyxl or other tools in the python-excel ecosystem for that. Within its narrowed scope it remains actively maintained, handling cell values, dates, number formats, and workbook/sheet structure for the older Excel binary format that many legacy enterprise systems and archives still produce.

What You Get

  • A open_workbook() entry point returning a Book object with sheets addressable by name or index
  • Cell-level access to values, types, and Excel’s internal number-format/date-format information via xlrd.sheet
  • Correct conversion of Excel’s serial date values to Python datetime objects via xlrd.xldate
  • Low-level BIFF and OLE2 compound-document parsing (xlrd.biffh, xlrd.compdoc) for developers needing deeper access to .xls internals
  • A bundled runxlrd.py CLI script for quick inspection of .xls file contents from the command line

Common Use Cases

  • Reading legacy .xls files produced by older enterprise systems, exports, or archives that predate the .xlsx format
  • Batch-processing or migrating historical .xls spreadsheet data into a database or newer file format
  • Extracting cell values and dates from .xls files as part of a data pipeline where openpyxl (which does not support .xls) isn’t applicable
  • Building a lightweight CLI or script to inspect the structure of an unfamiliar .xls file without opening Excel

Under The Hood

Architecture xlrd’s core is a two-layer parser: xlrd.compdoc decodes the OLE2/Compound Document File Binary Format container that wraps an .xls file’s internal streams, and xlrd.biffh/xlrd.book/xlrd.sheet decode the BIFF (Binary Interchange File Format) record stream inside that container into a Book object holding one or more Sheet objects, each exposing rows/columns of Cell values. xlrd.formatting reconstructs Excel’s number-format definitions so callers can tell a date cell from a currency cell, and xlrd.xldate converts Excel’s numeric date serials (handling both the 1900 and 1904 epoch systems) into Python datetime values. xlrd.formula separately decodes Excel formula byte-code when present, though only computed results are exposed, not live formula re-evaluation. Tech Stack Pure Python with no runtime dependencies, packaged with a conventional setup.py/setup.cfg; xlrd/timemachine.py is a small Python 2/3 compatibility shim reflecting the library’s long history predating Python 3-only codebases. Code Quality The tests/ directory holds 14 test modules covering BIFF record parsing, date conversion edge cases, and sample .xls fixtures; CI runs via CircleCI with Codecov coverage tracking as advertised in the README badges. The codebase itself is dense, low-level byte-parsing code (book.py and sheet.py each run over 1,400-2,400 lines) reflecting the intrinsic complexity of a binary file format rather than incidental complexity. API Design The primary entry point, xlrd.open_workbook(), returns a Book whose .sheets()/.sheet_by_name() and cell-indexing methods are simple and stable, requiring little boilerplate for the common case of just reading values; the tradeoff is that the library intentionally does not attempt to support newer .xlsx files at all, so callers must branch on file format themselves if they need to support both.

Used by 11 apps in this directory

Python
100%
Apache 2.0

Agno

Devops · AI Development · Automation

41,774

Build, run, and manage agent platforms with a full production stack — SDK, runtime, and control plane included.

View details
93
Repo Health
87
Technical
67
Dependency
Built with
Python100%
Updated today
Python
49%
Other

Airbyte

Developer Tools · Data Engineering

21,916

Open-source ELT platform with 600+ connectors for moving data from any source to warehouses, lakes, and AI agents.

View details
95
Repo Health
80
Technical
67
Dependency
Built with
Python49%
Kotlin42%
Updated today
Python
68%
Other

Baserow

No Code Platforms · Databases

5,635

Open-source no-code platform to build databases, apps, automations, and AI agents — self-hosted or cloud, with full data ownership.

View details
89
Repo Health
84
Technical
68
Dependency
Built with
Python68%
JavaScript15%
Vue12%
Updated today
Python
100%
Apache 2.0

BotCity Framework

Automation · Developer Tools

142

Computer-vision powered Python framework for building RPA bots that click, type, and read any desktop, web, or terminal UI without needing an API.

View details
60
Repo Health
53
Technical
73
Dependency
Built with
Python100%
Updated 5 days ago
TypeScript
84%
Apache 2.0

Continue

Developer Tools · AI Development · AI Code Assistants

35,532

Open-source coding agent for VS Code, JetBrains, and CLI with support for 30+ LLM providers.

View details
87
Repo Health
88
Technical
65
Dependency
Built with
TypeScript84%
Updated today
Python
80%
Apache 2.0

headroom

AI Development · Developer Tools

66,835

Compress everything your AI agent reads — tool outputs, logs, RAG chunks, and files — before it reaches the LLM, achieving 60–95% fewer tokens with the same answers.

View details
84
Repo Health
86
Technical
73
Dependency
Built with
Python80%
Rust14%
Updated today
Python
45%
GPL 3.0

MaxKB

AI Development · Knowledge Management

22,539

Build enterprise-grade AI agents with RAG, workflows & multi-modal support

View details
91
Repo Health
68
Technical
66
Dependency
Built with
Python45%
Vue37%
TypeScript17%
Updated today
Python
52%
Other

Odoo

ERP · CRM · Productivity

53,793

The open source ERP platform that integrates CRM, accounting, inventory, manufacturing, and 60+ business apps into one seamlessly connected suite.

View details
87
Repo Health
82
Technical
64
Dependency
Built with
Python52%
JavaScript44%
Updated today
Python
37%
Other

Open WebUI

AI Assistants · AI Agents

149,204

The extensible, privacy-first AI platform that runs Ollama, OpenAI, and any LLM backend behind a polished, feature-packed web interface.

View details
91
Repo Health
75
Technical
66
Dependency
Built with
Python37%
Svelte33%
JavaScript22%
Updated today

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search