1
| pip install xlrd==1.2.0
|
https://www.cnblogs.com/tynam/p/11204895.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
| #coding:utf-8
import xlrd
import sys
def readxls(filename):
data = xlrd.open_workbook(filename)
table = data.sheet_by_index(0)
datas = []
for rn in range(table.nrows):
datas.append(table.row_values(rn))
return datas
f1='mm.xlsx'
datas = readxls(f1)
|