标签:imp class log val ase port highlight xlrd base
import xlrd data = xlrd.open_workbook("databases.xls").sheet_by_name(u"mall") nrows = data.nrows ncols = data.ncols c = {} def data_mall(): for i in range(nrows): print(data.row_values(i)) # a={i:data.row_values(i)} # c.update(a) # print(a) print(data_mall())
python简单的对excel读取使用,‘open_workbook("excel_name.xls").sheet_by_name(u"sheet_name")‘ sheet_name为工作簿的名字。
标签:imp class log val ase port highlight xlrd base
原文地址:http://www.cnblogs.com/mologa-jie/p/6901020.html