Office.js:AddImage()在Excel联机版本中不起作用

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

我正在尝试从使用Office.js添加的Excel中添加新图像。

这是我的代码:

    image = activeWorkSheet.shapes.addImage(imageBase64);
    await context.sync();

    // set some image properties

这失败,并显示错误:

RichApi.Error: This operation is not implemented.
    at new c (https://appsforoffice.microsoft.com/lib/1/hosted/excel-web-16.00.js:24:287800)
    at a.e.processRequestExecutorResponseMessage (https://appsforoffice.microsoft.com/lib/1/hosted/excel-web-16.00.js:24:348351)
    at https://appsforoffice.microsoft.com/lib/1/hosted/excel-web-16.00.js:24:346456

我也尝试过使用“ Imagecoercion”,但这似乎不受支持,实际上,我无法使用它:https://github.com/OfficeDev/office-js/issues/648

我想念什么吗?

javascript office365 office-js office-addins excel-addins
1个回答
0
投票

Shapes API需要Excel.js版本1.9。您的Excel版本最近是否足以支持该版本?参见Excel API Requirement Sets

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