python读取excel,傻瓜式

import xlrd
data =xlrd.open_workbook('C:\Users\ad11.xls',ignore_workbook_corruption=True)
table = data.sheets()[0]

for row_index in range(3,table.nrows):
    res=[]
    for col_index in range(table.ncols):
        res.append(table.cell(row_index,col_index).value)  # 遍历所有的cell的值

        print(res)

你可能感兴趣的:(python,excel,开发语言)