How do I read Excel file in Python?

kath nitte.sudhir at
Thu Oct 5 16:11:14 CEST 2006

How do I read an Excel file in Python?

I have found a package to read excel file, which can be used on any
I installed and working on the examples, I found its printing of cell's
contents in a different manner.

>>> import xlrd
>>> book=xlrd.open_workbook("Calculation_file.xls")
>>> book=xlrd.open_workbook("testbook.xls")
>>> sh=book.sheet_by_index(0)
>>> for row in range(sh.nrows):
	print sh.row(rx)
[text:u'name', text:u'address', text:u'ph']
[text:u'sudhir', text:u'bangalore', number:1234.0]
[text:u'vinay', text:u'bangalore', number:3264.0]

I am bit confused with slicing. help me....

Thank you,

More information about the Python-list mailing list