如何用Python读取Excel表格并对内容排序.~-,::*_!##/=﹉++﹉…^
啊
python读取Excel表格可以用xlrd库
你可以看看这个库的介绍,根据你的数据需求,读取数据后存入合适容器,然后进行排列
from xlrd import open_workbook
# 读取test.xlsx文件
book = open_workbook(test.xlsx')
# 读取文件中的sheet
sheet = book.sheet_by_name('Sheet1')
# 读取一列数据并存入列表
keys = [sheet.cell(0, col_index).value for col_index in range(sheet.ncols)]