码迷,mamicode.com
首页 > 编程语言 > 详细

[python] xlrd

时间:2016-05-02 07:08:53      阅读:176      评论:0      收藏:0      [点我收藏+]

标签:

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)

[python] xlrd

标签:

原文地址:http://www.cnblogs.com/sarah-zhang/p/5451835.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!