I’m developing an Excel Add-In using the latest npm
version of the JavaScript API and I’m encountering an issue with the latest Excel API set (1.16) functionality.
I’m trying to access the valueAsJson
property from a RangeObject, which is part of Excel API 1.16. I installed the latest version 1.1.93 which is supposed to include this functionality. However, when loading this property from a Range
Object it fails and when debugging I can see that the Range
instance does not have a valueAsJson
property. I did everything according to the documentation:
- Installed the latest version of @microsoft/office-js (v1.1.93).
- Added the script reference in my HTML file like this:
<script src="/assets/office-js/office.js"></script>
- Most of the functionality works, but anything related to Excel API set 1.16 (like
valueAsJson
) is not available and can also not be found in the correpsonding office.d.ts file. - When switching to the CDN version of Office.js, everything works as expected, but we need the add-in to work offline, so using the CDN is not an option.
Does anyone know why this is happening or how it can be fixed?
Any help would be greatly appreciated!
Maximilian Sieber is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
The npm version of office.js (@microsoft/office-js (v1.1.93).) is no longer being updated. To use a local copy of office.js, you have to copy the files from the CDN.