一、方式1:sheet.cell(坐标)

需求2:我们想读取第3行,第4列单元格的内容,与其他“属性”

  1. cell = sheet.cell(3,4)
  2. # 读取这个单元格内容
  3. print(cell.value)
  4. # 读取这个单元格的其他属性
  5. print(cell.style)
  6. print(cell.font)
  7. print(cell.alignment)

二、方式2:sheet[‘excel坐标’]

需求2:我们想读取第3行,第4列单元格的内容,与其他“属性”

  1. cell = sheet['D3']
  2. # 读取这个单元格内容
  3. print(cell.value)
  4. # 读取这个单元格的其他属性
  5. print(cell.style)
  6. print(cell.font)
  7. print(cell.alignment)