How to: Specify API requirement sets and methods for your app (manifest schema v1.1)

apps for Office

Learn how to specify API requirement sets or required methods in your app's manifest.

Last modified: June 30, 2014

Applies to: Access app for SharePoint | Excel 2013 | Excel 2013 RT | Excel 2013 SP1 | Excel Online | Outlook 2013 | Outlook 2013 RT | Outlook 2013 SP1 | Outlook Web App | OWA for Devices | PowerPoint 2013 | PowerPoint 2013 RT | PowerPoint 2013 SP1 | PowerPoint Online | Project 2013 | Project 2013 SP1 | Word 2013 | Word 2013 RT | Word 2013 SP1

   Office.js: v1.0, v1.1

   Apps for Office manifests schema: v1.0, v1.1

In this article
Introduction
Requirement sets
Methods that aren't part of a requirement set
Additional resources

The Requirements element is a new optional element in the version 1.1 manifest. This element lets you specify named sets of API methods or individual methods that your app requires in order to run. If you don't specify this element in the manifest, the app should run in all Office host applications specified in the optional Hosts element (for information on how to specify the Hosts element, see How to: Specify the Office host applications your app supports (manifest schema v1.1)). For content and task pane apps, if you omit both the Hosts and Requirements elements, then the app should load in all Office host applications that support that specific type of app for Office.

Important note Important

For mail apps, if you use version 1.1 of the app for Office manifest, there is only one "Mailbox" requirement set available. This requirement set contains the entire subset of API supported in mail apps for Outlook, and you must specify the "Mailbox" requirement set in your mail app's manifest (it's not optional as is the case for content and task pane apps). Also, you can't declare support for specific methods in mail apps.

The following tables describe the Requirements, Sets, Set, Methods, and Method elements that you use to specify requirement sets or individual methods in content and task pane apps.

Requirements element

Description

Specifies the minimum set of Office.js requirements that the app for Office needs to activate.

Optional attributes

None

Required attributes

None

Child elements

Sets, Methods

Note Note

The Sets and Methods elements don't apply to mail apps.

Default version attribute pattern

x.y

If omitted, version default value

1.1

Sets element

Description

Specifies the list of required API sets from the JavaScript API for Office that the app requires in order to activate.

Optional attributes

DefaultMinVersion (string)

Required attributes

Name (string)

Child elements

Set

Set element

Description

Specifies an individual set from the JavaScript API for Office that the app requires in order to activate.

Optional attributes

MinVersion (string)

Required attributes

Name (string)

Methods element

Description

Specifies the list of required methods from the JavaScript API for Office that the app requires in order to activate.

Optional attributes

None

Required attributes

None

Child elements

Method

Method element

Description

Specifies an individual method from the JavaScript API for Office that the app requires in order to activate.

Optional attributes

None

Required attributes

Name

You must specify the fully qualified name of the method – the path for calling that method. For example, to specify the getSelectedDataAsync method, you must specify Office.context.document.getSelectedDataAsync

In the following example, the app should load in all Office host applications that support:

  • Office.js v1.1 TableBindings requirements set

  • Office.js v1.1 OOXML requirements set

  • Office.js Office.context.document.getSelectedDataAsync method

<Requirements>
   <Sets DefaultVersion="1.1">
      <Set Name="TableBindings"/>
      <Set Name="OOXML"/>
   </Sets>
   <Methods>
      <Method Name="Office.context.document.getSelectedDataAsync"/>
   </Methods>
</Requirements>

The following table lists the names of requirement sets, the methods in each set, and the Office host applications that will load an app that specifies that set.

Set name

Version

Methods in set

Office host support

ActiveView

1.1

Document.getActiveViewAsync

PowerPoint 2013 SP1

PowerPoint Online

BindingEvents

1.1

Binding.addHanderAsync

Binding.removeHanderAsync

Excel 2013 SP1

Excel Online

Word 2013 SP1

Access apps for SharePoint

CompressedFile

1.1

Supports output to Office Open XML (OOXML) format as a byte array (Office.FileType.Compressed) when using the Document.getFileAsync method.

PowerPoint 2013 SP1

Word 2013 SP1

CustomXmlParts

1.1

CustomXmlNode.getNodesAsync

CustomXmlNode.getNodeValueAsync

CustomXmlNode.getXmlAsync

CustomXmlNode.setNodeValueAsync

CustomXmlNode.setXmlAsync

CustomXmlPart.addHandlerAsync

CustomXmlPart.deleteAsync

CustomXmlPart.getNodesAsync

CustomXmlPart.getXmlAsync

CustomXmlPart.removeHandlerAsync

CustomXmlParts.addAsync

CustomXmlParts.getByIdAsync

CustomXmlParts.getByNamespaceAsync

CustomXmlPrefixMappings.addNamespaceAsync

CustomXmlPrefixMappings.getNamespaceAsync

CustomXmlPrefixMappings.getPrefixAsync

Word 2013 SP1

DocumentEvents

1.1

Document.addHandlerAsync

Document.removeHandlerAsync

Excel 2013 SP1

Excel Online

PowerPoint 2013 SP1

Word 2013 SP1

File

1.1

Document.getFileAsync

File.closeAsync

File.getSliceAsync

PowerPoint 2013 SP1

Word 2013 SP1

HtmlCoercion

1.1

Supports coercion to HTML (Office.CoercionType.Html) when reading and writing data using the Document.getSelectedDataAsync, Document.setSelectedDataAsync, Binding.getDataAsync, or Binding.setDataAsync methods.

Word 2013 SP1

Mailbox

1.1

All API members supported by mail apps (those members accessed from Office.context and Office.context.mailbox in your app's code).

Outlook 2013 SP1

Outlook Web App

OWA for Devices

MatrixBindings

1.1

Bindings.addFromNamedItemAsync

Bindings.addFromSelectionAsync

Bindings.getAllAsync

Bindings.getByIdAsync

Bindings.releaseByIdAsync

MatrixBinding.getDataAsync

MatrixBinding.setDataAsync

Excel 2013 SP1

Excel Online

Word 2013 SP1

MatrixCoercion

1.1

Supports coercion to the "matrix" (array of arrays) data structure (Office.CoercionType.Matrix) when reading and writing data using the Document.getSelectedDataAsync, Document.setSelectedDataAsync, Binding.getDataAsync, or Binding.setDataAsync methods.

Excel 2013 SP1

Excel Online

Word 2013 SP1

OoxmlCoercion

1.1

Supports coercion to Open Office XML (OOXML) format (Office.CoercionType.Ooxml) when reading and writing data using the Document.getSelectedDataAsync, Document.setSelectedDataAsync, Binding.getDataAsync, or Binding.setDataAsync methods.

Word 2013 SP1

PartialTableBindings

1.1

Access apps for SharePoint

PdfFile

1.1

Supports output to PDF format (Office.FileType.Pdf) when using the Document.getFileAsync method.

PowerPoint 2013 SP1

Word 2013 SP1

Selection

1.1

Document.getSelectedDataAsync

Document.setSelectedDataAsync

Excel 2013 SP1

Excel Online

PowerPoint 2013 SP1

Project 2013 SP1

Word 2013 SP1

Settings

1.1

Settings.get

Settings.remove

Settings.saveAsync

Settings.set

Excel 2013 SP1

Excel Online

PowerPoint 2013 SP1

PowerPoint Online

Word 2013 SP1

Access apps for SharePoint

TableBindings

1.1

Bindings.addFromNamedItemAsync

Bindings.addFromSelectionAsync

Bindings.getAllAsync

Bindings.getByIdAsync

Bindings.releaseByIdAsync

TableBinding.addColumnsAsync

TableBinding.addRowsAsync

TableBinding.deleteAllDataValuesAsync

TableBinding.getDataAsync

TableBinding.setDataAsync

Excel 2013 SP1

Excel Online

Word 2013 SP1

Access apps for SharePoint

TableCoercion

1.1

Supports coercion to the "table" data structure (Office.CoercionType.Table) when reading and writing data using the Document.getSelectedDataAsync, Document.setSelectedDataAsync, Binding.getDataAsync, or Binding.setDataAsync methods.

Excel 2013 SP1

Excel Online

Word 2013 SP1

Access apps for SharePoint

TextBindings

1.1

Bindings.addFromNamedItemAsync

Bindings.addFromSelectionAsync

Bindings.getAllAsync

Bindings.getByIdAsync

Bindings.releaseByIdAsync

TextBinding.getDataAsync

TextBinding.setDataAsync

Excel 2013 SP1

Excel Online

Word 2013 SP1

TextCoercion

1.1

Supports coercion to text format (Office.CoercionType.Text) when reading and writing data using the Document.getSelectedDataAsync, Document.setSelectedDataAsync, Binding.getDataAsync, or Binding.setDataAsync methods.

Excel 2013 SP1

Excel Online

PowerPoint 2013 SP1

Project 2013 SP1

Word 2013 SP1

TextFile

1.1

Supports output to text format (Office.FileType.Text) when using the Document.getFileAsync method.

Word 2013 SP1

The following methods in the JavaScript API for Office v1.1 aren't part of a requirement set.

Method name

Office host support

Bindings.addFromPromptAsync

Access 2013, Excel 2013 and Excel Online

Document.getFilePropertiesAsync

Excel 2013, Excel Online, Word 2013, and PowerPoint 2013

Document.getProjectFieldAsync

Project Standard 2013 and Project Professional 2013

Document.getResourceFieldAsync

Project Standard 2013 and Project Professional 2013

Document.getSelectedResourceAsync

Project Standard 2013 and Project Professional 2013

Document.getSelectedTaskAsync

Project Standard 2013 and Project Professional 2013

Document.getSelectedViewAsync

Document.getTaskAsync

Project Standard 2013 and Project Professional 2013

Document.getTaskFieldAsync

Project Standard 2013 and Project Professional 2013

Document.roperByIdAsync

Excel 2013, Excel Online, Word 2013, and PowerPoint 2013

Settings.addHandlerAsync

Access 2013, Excel 2013, Excel Online, Word 2013, and PowerPoint 2013

Settings.refreshAsync

Access 2013, Excel 2013, Excel Online, Word 2013, and PowerPoint 2013

Settings.removeHandlerAsync

Access 2013, Excel 2013, Excel Online, Word 2013, and PowerPoint 2013

TableBinding.clearFormatsAsync

Excel 2013, Excel Online

TableBinding.setFormatsAsync

Excel 2013, Excel Online

TableBinding.setTableOptionsAsync

Excel 2013, Excel Online

Show:
© 2014 Microsoft