Tiny python code for parsing data from an Office Open XML Spreadsheet - xlsx
Switch branches/tags
Nothing to show
Clone or download
staale Merge pull request #30 from zcattacz/master
avoid various error message regarding rowsIter()
Latest commit 4327158 Jun 24, 2015



A small footprint xlsx reader that understands shared strings and can process excel dates.


No external requirements. Supports Python versions 2.6+ and 3.2+.


book = Workbook('filename or filedescriptor') #Open xlsx file
for sheet in book:
    print sheet.name
    # for larger workbooks, use sheet.rowsIter() instead of
    # sheet.rows().iteritems()
    for row, cells in sheet.rows().iteritems(): # or sheet.cols()
        print row # prints row number
        for cell in cells:
            print cell.id, cell.value, cell.formula

# or you can access the sheets by their name:

some_sheet = book['some sheet name']


To my knowledge there are other python alternatives: