How To/python/

How to read Microsoft Excel files with Python

Use xlrd module. On xlrd projects page you can also find modules for writing and manipulating excel files.

import xlrd
 
# open xls file
xls = xlrd.open_workbook('data.xls')
# get first sheet (index 0)
sheet = xls.sheet_by_index(0)
# read first column (index 0) and red every cell data
for call in sheet.col(0):
    print cell.value