Excel Add-In: API Set 1.16 Not Available When Using Local Office.js Version

Maximilian Sieber 0 Reputation points
2024-09-13T06:56:33.23+00:00

I'm developing an Excel Add-In using the 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. However, it seems that the required features from API set 1.16 are missing from my project, although I have followed every step required in 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!

Excel
Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
1,983 questions
JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
1,002 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.