ExternalLinkCollection类

ExternalLinkCollection类

表示工作簿中的外部链接集合。

ExternalLinkCollection 类型公开了以下成员:

特性

属性 描述
count 获取集合中实际包含的元素数。

获取指定索引处的 ExternalLink 元素。

索引器

名称 描述
[index] 元素的从零开始的索引。

方法

方法 描述
add(file_name, sheet_names) 添加外部链接。
add(directory_type, file_name, sheet_names) 添加外部链接。
clear() 删除所有外部链接。
clear(update_references_as_local) 删除所有外部链接。
remove_at(index) 从工作簿中删除指定的外部链接。
remove_at(index, update_references_as_local) 从工作簿中删除指定的外部链接。

例子

from aspose.cells import Workbook

# Open a file with external links
workbook = Workbook("book1.xls")
# Change external link data source
workbook.worksheets.external_links[0].data_source = "d:\\link.xls"

也可以看看