1
我通過Manifest和Functionfile將Javascript函數連接到Excel Ribbon Ribbon Icon。不能跨Office Ribbon加載項的Ribbon ExecuteFunction命令存儲JS值
這是我FunctionFile:
(function() {
Office.initialize = function (reason) {
//If you need to initialize something you can do so here.
};
})();
var i = 42;
//Notice function needs to be in global namespace
function undo() {
console.log(i);
i++;
}
現在,當我點擊絲帶圖標,它打印放42到JavaScript控制檯。但是,當我嘗試再次運行它時,沒有任何反應。這是一個錯誤?