标签:class sheet print 读取 test color 读取excel int pre
‘‘‘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‘)
标签:class sheet print 读取 test color 读取excel int pre
原文地址:https://www.cnblogs.com/tiandsp/p/8905835.html