Python读取表格中超链接

import openpyxl
import re

# 加载Excel文件
workbook = openpyxl.load_workbook('ICS.xlsx')
sheet = workbook.active
# 遍历A列
for row in sheet.iter_rows(min_col=1, max_col=1):
    for cell in row:
        if cell.hyperlink:
            print(f"{cell.hyperlink.target}")

# 关闭工作簿
workbook.close()

posted @ 2024-10-24 17:11  icssec  阅读(18)  评论(0)    收藏  举报