'''python3读取excle数据''' import xlrd workbook = xlrd.open_workbook(r'test.xls', encoding_override='gbk') print(workbook.sheet_names()) sheet = workbook.sheet_by_name('Sheet 1') print(sheet.nrows, sheet.ncols) for i in range(sheet.nrows): for j in range(sheet.ncols): print(sheet.cell(i, j).value, end=' ') print('\n')