Friday, October 21, 2005

excel data xtract

In case i hadn't noticed yet: xlrd, marvelous tiny python-only package for reading excel files.

From it's PyPi page:
Extract data from new and old Excel spreadsheets on any platform. Pure Python code. Strong support for Excel dates. Unicode-aware.;Any platform -- don't need Windows


From it's homepage:

Purpose: Provide a library for developers to use to extract data from Microsoft Excel (tm)
spreadsheet files. It is not an end-user tool.


Platform: Any. You don't need to be on Windows. If you are, you can avoid hassles with approaches like COM, ODBC, save-as-CSV, …

Python requirements: Works with Python 2.2 or later. There are no dependencies on modules or packages outside the standard Python distribution.

Versions of Excel supported: 2004, 2002, XP, 2000, 97, 95, 5.0, 4.0, 3.0.

Features:

          
  • Support for handling dates, and documentation of Excel date problems and how to avoid them.
  • Unicode aware; correctly handles "compressed" Unicode in modern files; decodes legacy charsets in older files (if Python has the codec).
  • Extracts all data (including Booleans and error-values)