Open Source Python API for Spreadsheets

Python library for reading and formatting XLS & XLSX file format.

Xlrd is an open source python API for reading & formatting Microsoft Excel (XLS, XLSX) file format. The API allows the Python developer to read Excel files, handle unicodes in it, manage dates, format cells & columns, use constant, foumulas, macros and more. Furthermore, the API provides loading worksheets on demand functionality that allows developers to save memory by loading only the required sheets.

The devloper no more maintains the API, and corrupted & non-standard Excel file will not work with this API. The API will ignore VBA modules, comments, hyperlinks, autofilters, advance filters and few other excel features aswell.

Previous Next

Getting Started with Xlrd

You need to have Python 2.7 or 3.4+ or higher installed on your system to run Xlrd smoothly. The recommended way to install via PIP. Please use the following command.

pip install xlrd

Read Excel Worksheets via Free Python API

Xlrd API allows reading Microsoft Excel XLS & XLSX file using Python. The developers can easily open exisiting workbook using xlrd.open_workbook() method. You can get worksheets and sheet names of your excel file using workbook.nsheets & workbook.sheet_names properties respectively. In order to read rows & columns you can select a sheet by using workbook.sheet_by_index() method and use worksheet.nrows & worksheet.ncols respectively.

Load Worksheets on Demand using Python

The Open Source spreadsheet library Xlrd allows software developers to load worksheets on demand. The functionality reduces memory usage and loads only required worksheets. You can use on-demand load functionality by using on_demang argument.

Formatting Informatin in Excel using Python

Xlrd library gives developers the capability to read, display & render excel spreadsheet contents on a screen or to another file without losing the ability to display/render it. Defualt formatting is appllied to all empty cells. The API firstly will use Rowinfo & Colinfo class to get the properties. If Rowinfo & Colinfor class properties are not available the API will use the default properties.