我需要在python代码中调用excel表格中的单元格值以对其进行数学运算。输出与Excel表格中的原始矩阵的顺序矩阵相同。
我尝试了for循环来每次检索单元格值。但结果显示3个点。 three dots in the set of lists. This set is equal to number of rows in the matrix. Number of rows is equal to number of columns
workbook = xlrd.open_workbook('ahpresponseinpt.xlsx')
sheet = workbook.sheet_by_index(0)
rows = sheet.nrows
cols = sheet.ncols
matrix = []
for i in range(rows):
row = []
for j in range(cols):
row.append(row)
matrix.append(row)
print(matrix)
我期望列表中行的值。