wangylblog

openpyxl

# Get Table by name or range
from openpyxl import *
wb = load_workbook(path)
ws = wb.get_active_sheet()
# 读取A1:D10
A1_D10 = ws.tables["A1:D10"]

pandas

import pandas as pd
titanic = pd.read_excel(\'titanic.xlsx\', sheet_name=\'passengers\')
# 读取10至25行和第3至5行。
titanic.iloc[9:25, 2:5]
# 35岁以上的乘客
adult_names = titanic.loc[titanic["Age"] > 35, "Name"]

rpa

import rpa
excel=rpa.excel.open(path,visible=True,readonly=True)
sheet=excel.get_sheet(\'质检表\')
# 读取A1:L1
Sheet.read(\'A1:L1\')

分类:

技术点:

相关文章:

  • 2021-09-27
  • 2021-12-29
  • 2021-12-07
  • 2021-07-16
  • 2021-09-19
  • 2022-01-13
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-06
  • 2021-12-12
相关资源
相似解决方案