ftp http://www.lexicon.net/sjmachin/xlrd-0.6.1.zip
unzip xlrd-0.6.1.zip
sudo python setup.py install
xlrd - works as advertized, no mess, no fuss. "There are no dependencies on modules or packages outside the standard Python distribution." - that's what we like to hear.
Quick start is here.
Reading dates is here.
xlrd.xldate_as_tuple(sh.cell_value(rowx=120, colx=0),1) (1 for Mac OS)
unzip xlrd-0.6.1.zip
sudo python setup.py install
xlrd - works as advertized, no mess, no fuss. "There are no dependencies on modules or packages outside the standard Python distribution." - that's what we like to hear.
Quick start is here.
import xlrd
book = xlrd.open_workbook("myfile.xls")
print "The number of worksheets is", book.nsheets
print "Worksheet name(s):", book.sheet_names()
sh = book.sheet_by_index(0)
print sh.name, sh.nrows, sh.ncols
print "Cell D30 is", sh.cell_value(rowx=29, colx=3)
for rx in range(sh.nrows):
print sh.row(rx)
Reading dates is here.
xlrd.xldate_as_tuple(sh.cell_value(rowx=120, colx=0),1) (1 for Mac OS)
Comments
Post a Comment