WPS 加载项开发 > 表格 API 参考 > Workbook > 属性 > Workbook.UpdateLinks 属性
返回或设置一个 XlUpdateLink 常量,该常量指示更新嵌入 OLE 链接的工作簿设置。可读写。

语法

表达式.UpdateLinks

表达式   一个代表 Workbook 对象的变量。

说明

XlUpdateLinks 可为以下 XlUpdateLinks 常量之一。
xlUpdateLinksAlways 始终更新指定工作簿的嵌入 OLE 链接。
xlUpdateLinksNever 从不更新指定工作簿的嵌入 OLE 链接。
xlUpdateLinksUserSetting 按照用户对指定工作簿的设置,更新指定工作簿的嵌入 OLE 链接。

示例

在本示例中,ET 确定更新链接的设置,并通知用户。

示例代码
function UseUpdateLinks() {
    let wkbOne = Application.Workbooks(1)

    switch(wkbOne.UpdateLinks) {
        case xlUpdateLinksAlways:
	    MsgBox("Links will always be updated for the specified workbook.")
	    break
        case xlUpdateLinksNever:
	    MsgBox("Links will never be updated for the specified workbook.")
	    break
        default:
            MsgBox("Links will update according to user settting for the specified workbook.")
	    break
    }
}


请参阅