问题
In my Excel add-in, I save settings via the common Settings API, like this:
Office.context.document.settings.set("user-selected-stock","MSFT");
Office.context.document.settings.saveAsync();
Starting about a week ago, many of my add-in users have begun complaining that this feature is no longer working. I was able to confirm that the problem is an issue with Excel, because a user was able to reproduce the issue with the People Graph add-in, which is built by Microsoft and preinstalled by default. Here are the repro steps:
- New workbooks > Insert > People Graph (the green button beside Add-ins)
- When it loads, click inside and click the gear (settings) icon in the top right. You should see some settings slide in from the right hand side.
- Switch from the white background to the yellow background in the settings pane.
- Save the workbook and close it.
- Reopen the workbook.
Expected: see the yellow background (persisted by the Settings API)
Actual: see the white background (Settings not persisted). When I examine the WebExtension XML part in the file, the "properties" node, where Settings should be stored, appears empty.
Environment: Office Home & Student 2016 Excel Version 1906, Build 11727.20244 Windows 10
Is this a known issue?
回答1:
Yes, it is a known issue. Team is working hard to fix it and it is in the processing of releasing. Thanks a lot for reporting it.
来源:https://stackoverflow.com/questions/57137876/settings-api-for-office-add-ins-office-js-is-not-working-in-excel