Please use openpyxl where you can...

Overview

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

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:

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
Comments
  • Python 3 support (without 2to3 build step)

    Python 3 support (without 2to3 build step)

    This supersedes PR #2, but does require Python 2.7 or later.

    It's been pointed out to me that the format strings for struct can be byte strings. Using that would make the code somewhat neater, but I'm waiting for confirmation as to whether it's safe to rely on that feature.

    I've checked tests and the demo against Python 2.7 and 3.2. Test coverage is now reported as 49% of statements.

    opened by takluyver 31
  • Avoid raising exception when WRITEACCESS record can't be decoded

    Avoid raising exception when WRITEACCESS record can't be decoded

    Based off the below stack overflow answer. would like to be part of the release http://stackoverflow.com/questions/28334966/encoding-error-when-opening-an-excel-file-with-xlrd

    opened by karthik67 15
  • docs update

    docs update

    Update and rst markup.

    Tutorial is implemented as dev guide

    For some strange reason, module variables and class attributes doc strings dont appear ;-(

    opened by pedromorgan 10
  • Strip non unicode spaces from last author

    Strip non unicode spaces from last author

    Strip spaces from last author to deal with malformed author fields.

    I realise that it would be better to fix the source docs, but these are third party docs and we don't have the option to fix them at source.

    opened by davismr 9
  • Fix xlsx sheet->comments relationship

    Fix xlsx sheet->comments relationship

    Instead of the previous bogus assumption that xl/commentsN.xml always referred to xl/worksheets/sheetN.xml, now find the correct comments file for a given sheet via xl/worksheets/_rels/sheetN.xml.rels

    Closes python-excel/xlrd#108

    opened by gthb 9
  • fixing coveralls for py27

    fixing coveralls for py27

    coveralls for py27 will have an incompatible requests and urllib3 version unless the upgrade flag is given to pip.

    This means py27 coverage doesn't show up in coveralls and it'll fail PRs for this reason.

    (Merge this first pls)

    opened by nayyarv 7
  • Use replacement marker for poorly packed unicode string

    Use replacement marker for poorly packed unicode string

    This PR will change the behavior of unpacking poorly packed unicode strings.

    It will replace corrupted bytes into U+FFFD (REPLACEMENT CHARACTER) instead of raising error, so that the whole parsing process can be unaffected by workbook's trivial or local errors.

    opened by g6123 7
  • Fix for forward slash file separator and lowercase names.

    Fix for forward slash file separator and lowercase names.

    Workaround for some third party files that use forward slashes and lower case names. It maps the expected name in lowercase to the actual filename in the zip container.

    Fix for the issues in #96.

    opened by jmcnamara 7
  • Read cell comments in .xlsx files

    Read cell comments in .xlsx files

    This builds on the work done in https://github.com/python-excel/xlrd/pull/38.

    It adds tests for parsing comments out of .xlsx files generated by Excel 2007 and Google Docs, and copes correctly with the two different comment structures identified in the previous pull request.

    opened by stephenlewis 7
  • Import version number from a .py file rather than reading a .txt file.

    Import version number from a .py file rather than reading a .txt file.

    The version.txt approach broke xlrd for people using freezer tools to bundle it into applications. This PR uses an info.py file to store the version number instead.

    From discussion on the mailing list, although this needs a bit of a hack in setup.py, it should work for everyone.

    opened by takluyver 7
  • Support alternate sharedStrings.xml locations

    Support alternate sharedStrings.xml locations

    Not all versions of Excel (or compatible export mechanisms - Like that in Microsoft AX) put the sharedStrings file into the hardcoded location /xl/sharedStrings.xml

    Added code to handle known possible locations and test with file located elsewhere.

    opened by a1ph4g33k 6
Using openpyxl in Python, performed following task

Python-Automation-with-openpyxl Using openpyxl in Python, performed following tasks on an Excel Sheet containing Product Suppliers along with their pr

null 1 Apr 6, 2022
Vulnerability Scanner & Auto Exploiter You can use this tool to check the security by finding the vulnerability in your website or you can use this tool to Get Shells

About create a target list or select one target, scans then exploits, done! Vulnnr is a Vulnerability Scanner & Auto Exploiter You can use this tool t

Nano 108 Dec 4, 2021
A calendaring app for Django. It is now stable, Please feel free to use it now. Active development has been taken over by bartekgorny.

Django-schedule A calendaring/scheduling application, featuring: one-time and recurring events calendar exceptions (occurrences changed or cancelled)

Tony Hauber 814 Dec 26, 2022
A calendaring app for Django. It is now stable, Please feel free to use it now. Active development has been taken over by bartekgorny.

Django-schedule A calendaring/scheduling application, featuring: one-time and recurring events calendar exceptions (occurrences changed or cancelled)

Tony Hauber 814 Dec 26, 2022
MoinMoin Wiki Development (2.0+), unstable, for production please use 1.9.x.

MoinMoin - a wiki engine in Python MoinMoin is an easy to use, full-featured and extensible wiki software package written in Python. It can fulfill a

MoinMoin Wiki Engine 240 Dec 22, 2022
THIS IS THE **OLD** PYMC PROJECT. PLEASE USE PYMC3 INSTEAD:

Introduction Version: 2.3.8 Authors: Chris Fonnesbeck Anand Patil David Huard John Salvatier Web site: https://github.com/pymc-devs/pymc Documentation

PyMC 7.2k Jan 7, 2023
Python script to commit to your github for a perfect commit streak. This is purely for education purposes, please don't use this script to do bad stuff.

Daily-Git-Commit Commit to repo every day for the perfect commit streak Requirments pip install -r requirements.txt Setup Download this repository. Cr

JareBear 34 Dec 14, 2022
You can easily send campaigns, e-marketing have actually account using cash will thank you for using our tools, and you can support our Vodafone Cash +201090788026

*** Welcome User Sorry I Mean Hello Brother ✓ Devolper and Design : Mokhtar Abdelkreem ========================================== You Can Follow Us O

Mo Code 1 Nov 3, 2021
Participants of Bertelsmann Technology Scholarship created an awesome list of resources and they want to share it with the world, if you find illegal resources please report to us and we will remove.

Participants of Bertelsmann Technology Scholarship created an awesome list of resources and they want to share it with the world, if you find illegal

Wissem Marzouki 29 Nov 28, 2022
This is a cryptocurrency trading bot that analyses Reddit sentiment and places trades on Binance based on reddit post and comment sentiment. If you like this project please consider donating via brave. Thanks.

This is a cryptocurrency trading bot that analyses Reddit sentiment and places trades on Binance based on reddit post and comment sentiment. The bot f

Andrei 157 Dec 15, 2022
Andrei 1.4k Dec 24, 2022
Transfer style api - An API to use with Tranfer Style App, where you can use two image and transfer the style

Transfer Style API It's an API to use with Tranfer Style App, where you can use

Brian Alejandro 1 Feb 13, 2022
This Tool can help enginners and biggener in network, the tool help you to find of any ip with subnet mask that can calucate them and show you ( Availble IP's , Subnet Mask, Network-ID, Broadcast-ID )

This Tool can help enginners and biggener in network, the tool help you to find of any ip with subnet mask that can calucate them and show you ( Availble IP's , Subnet Mask, Network-ID, Broadcast-ID )

null 12 Dec 13, 2022
A bot can play all variants, but standard are abit weak, so if you need strongest you can change fsf instead of stockfish_14_Dev

MAINTAINERS Drdisrespect1 and drrespectable lichess-bot Engine communication code taken from https://github.com/ShailChoksi/lichess-bot by ShailChoksi

RPNS Nimsilu 1 Dec 12, 2021
Modern responsive template for the Django admin interface with improved functionality. We are proud to announce completely new Jet. Please check out Live Demo

Django JET Modern template for Django admin interface with improved functionality Attention! NEW JET We are proud to announce completely new Jet. Plea

Geex Arts 3.4k Dec 29, 2022
A faster and highly-compatible implementation of the Python programming language. The code here is out of date, please follow our blog

Pyston is a faster and highly-compatible implementation of the Python programming language. Version 2 is currently closed source, but you can find the

null 4.9k Dec 21, 2022
No longer maintained, please migrate to model_bakery

Model Mommy: Smart fixtures for better tests IMPORTANT: Model Mommy is no longer maintained and was replaced by Model Bakery. Please, consider migrati

Bernardo Fontes 917 Oct 4, 2022
No longer maintained, please migrate to model_bakery

Model Mommy: Smart fixtures for better tests IMPORTANT: Model Mommy is no longer maintained and was replaced by Model Bakery. Please, consider migrati

Bernardo Fontes 917 Oct 4, 2022
A fresh approach to autocomplete implementations, specially for Django. Status: v3 stable, 2.x.x stable, 1.x.x deprecated. Please DO regularely ping us with your link at #yourlabs IRC channel

Features Python 2.7, 3.4, Django 2.0+ support (Django 1.11 (LTS), is supported until django-autocomplete-light-3.2.10), Django (multiple) choice suppo

YourLabs 1.7k Jan 1, 2023