[python] xlrd

0.xlrd introduce 

Library for developers to extract data from Microsoft Excel (tm) spreadsheet files

1. install xlrd

2. use xlrd in python

1 import xlrd
2 
3 book = xlrd.open_workbook(f)
4 sheet = book.sheet_by_index(0)  
5 sheet.cell(ROW_NO, COLUM_NO).value  
View Code

line 1: import xlrd module

line 3: open a xlsx file whose name is f

line4: open a sheet whose number is 0

line 5: get a specific value which is in (ROW_NO, COLUM_NO)

posted @ 2016-05-02 04:29  心怀阳光  阅读(133)  评论(0编辑  收藏  举报