2
votes

some 2 weeks ago I created an Add-in for excel, which worked! Then I had one week vacation and now, when I start it again, it tells me "The method or property NamedItemCollection.getItemOrNullObject is part of the ExcelApi 1.4 requirement set, which is not available in your version of Excel".

I have Office 365 Pro Plus, Deferred Channel and Version 1701 (Build 7766.2099) - which is (according to the table here: https://support.office.com/en-us/article/Version-and-build-numbers-of-update-channel-releases-ae942449-1fca-4484-898b-a933ea23def7) version from July 27, 2017.

On this page, https://dev.office.com/reference/add-ins/requirement-sets/excel-api-requirement-sets?product=excel is written, that Excel API 1.4 should be available for 1701 (but different build number...??) and that it was released on January 2017.

Most interesting is, that it worked 2 weeks ago and now it doesn't. The only difference on my computer is the installation of the latest update of Visual studio (from 8/2017). It seems to me to be quite a big mess. Can anybody help me to get oriented in it?

(Office.js is referenced from CDN using:

    <script type="text/javascript" src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js" ></script>

)

Filip

2

2 Answers

0
votes

To add to Marc's answer (which is absolutely correct re. the version numbers):

For the piece about why you weren't seeing the error previously: this extra error check is something we introduced very recently, having found cases where the lack of this check (at the JS layer) could lead to code that executes preview APIs (and potentially causing crashes on unsupported hosts).

We try very hard to never break back-compat (rather important when you have an evergreen CDN endpoing!). In this case, we deemed that it was OK to make this change, because the only code that our change would break is code that was already "unsafe" (i.e., missing this check, and having undefined behavior on older hosts). The check would make the issue come to light more, but that's arguably better than having silently-swallowed errors.

In any case, my apologies for the inconvenience, and do let us know if you have further questions.

0
votes

Based on the build you have installed (7766.2099), ExcelApi v1.4 is not included. You would need to update to 7870.2024 or newer before it will be available.

I'm not sure why you were not seeing this error previously. The only way I could see that happening would be if your administrator rolled back your version of Excel (i.e. switched you to deferred rather than current) or you were using Excel Online.

One clarification on that table: it isn't saying that Version 1701 (Build 7870.2024) was released in January 2017. This table shows the versions by platform and it is saying that v1.4 is included in Excel for Windows Version 1701 (Build 7870.2024) or later and Excel Online as of January 2017.