xlrd:
- cmd
- pip install xlrd
01. 打开Excel: xlrd.open_workbook('文件地址')
02. 找到Sheet: xlsx.sheet_by_name('表名')/ xlsx.sheet_by_index(表序号)
03. 根据行列读取内容: table.cell_value(行,列) / table.cell(行,列).value / table.row(行)[列].value
#
import xlrd xlsx = xlrd.open_workbook('D:/python/Nozzle parameter convertor & Comprasion between nozzle from Changjiang and Graco.xlsx') table = xlsx.sheet_by_index(0) # table = xlsx.sheet_by_name("sheet1") print(table.cell(12,6).value) print(table.cell_value(12,6))
#