主题
Address (属性)
返回或设置一个 str 型,它代表目标文档的地址。
示例
python
#本示例显示单元格B2中第一项超链接的地址
def test():
hl = Range("B2").Hyperlinks.Item(1)
print(f"超链接的目标地址是 {hl.Address}")
python
#本示例修改工作表Sheet1中第一项超链接的地址
def test():
hl = Application.Worksheets.Item("Sheet1").Hyperlinks.Item(1)
hl.Address = "https://wps.cn/"
print(f"超链接的地址已修改为 {hl.Address}")