对于已保存的工作簿,Excel web api自定义属性检索失败

问题描述 投票:0回答:1

当我尝试获取已保存的工作簿的自定义属性时,使用Excel版本1803(Build 912xxxxx)挂起。如果excel工作簿处于未保存状态,则相同的代码段可以正常工作。我在scriptlab中测试了下面的代码片段

    var customDocProps = context.workbook.properties.custom;
    console.log("Proceeding to load custom properties");
    context.load(customDocProps);
    return context.sync()
        .then(function () {
            console.log("Proceeding to evaluate execute context results");
            var docidprop = customDocProps.getItemOrNullObject("abc");
            context.load(docidprop);
            return context.sync()
                .then(function () {
                    if (typeof (docidprop.value) === 'undefined') {
                        console.log("No such custom property");
                    }
                });
        });

我还注意到,当此代码在保存的工作簿上触发时,Excel应用程序的内存使用量达到峰值,我必须终止excel应用程序进程

excel office-js
1个回答
0
投票

根据office dev team,这是excel中的一个错误,已经修复,很快就会推出。

© www.soinside.com 2019 - 2024. All rights reserved.