Requirement sets are named groups of API members. Office Add-ins use requirement sets specified in the manifest or use a runtime check to determine whether an Office application supports APIs that an add-in needs. For more information, see Office versions and requirement sets.
Requirement set availability
Excel add-ins run across multiple versions of Office, including Office 2016 or later on Windows, and Office on the web, Mac, and iPad. The following table lists the Excel requirement sets, the supported Office client applications, and the minimum builds or versions for those applications where applicable.
Note
To use APIs in any of the numbered requirement sets or ExcelApiOnline, you should reference the production library on the Office.js content delivery network (CDN).
Requirement sets are named groups of API members. An Office Add-in can perform a runtime check or use requirement sets specified in the manifest to determine whether an Office application supports the APIs that the add-in needs.
Checking for requirement set support at runtime
The following code sample shows how to determine whether the Office application where the add-in is running supports the specified API requirement set.
JavaScript
if (Office.context.requirements.isSetSupported('ExcelApi', '1.3')) {
// Perform actions.
}
else {
// Provide alternate flow/logic.
}
Defining requirement set support in the manifest
You can use the Requirements element in the add-in manifest to specify the minimal requirement sets and/or API methods that your add-in requires to activate. If the Office application or platform doesn't support the requirement sets or API methods that are specified in the Requirements element of the manifest, the add-in won't run in that application or platform, and it won't display in the list of add-ins that are shown in My Add-ins. If your add-in requires a specific requirement set for full functionality, but it can provide value even to users on platforms that do not support the requirement set, we recommend that you check for requirement support at runtime as described above, instead of defining requirement set support in the manifest.
The following code sample shows the Requirements element in an add-in manifest which specifies that the add-in should load in all Office client applications that support ExcelApi requirement set version 1.3 or greater.
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Office Add-ins feedback
Office Add-ins is an open source project. Select a link to provide feedback:
Demonstrate that you have the advanced skills needed to get the most out of Excel (Microsoft 365 Apps) by earning a Microsoft Office Specialist (MOS) Expert certification.