Export (0) Print
Expand All

CoercionType enumeration (JavaScript API for Office v1.1)

JavaScript API for Office v1.1

Specifies how to coerce data returned or set by the invoked method.

Last modified: March 04, 2014

#CoercionType_SlideRange

Office.CoercionType

Values

Enumeration

Value

Description

Office.CoercionType.Html

"html"

Return or set data as HTML.

Note Note

This is only applicable for data in Word 2013.

Office.CoercionType.Matrix

"matrix"

Return or set data as tabular data with no headers.

Data is returned or set as an array of arrays containing one-dimensional runs of characters. For example, three rows of string values in two columns would be: [["R1C1", "R1C2"], ["R2C1", "R2C2"], ["R3C1", "R3C2"]].

Note Note

This is only applicable for data in Excel 2013 and Word 2013.

Office.CoercionType.Ooxml

"ooxml"

Return or set data as Office Open XML.

Note Note

This is only applicable for data in Word 2013.

Office.CoercionType.SlideRange

"slideRange"

Return a JSON object that contains an array of the ids, titles, and indexes of the selected slides.

For example, {"slides":[{"id":257,"title":"Slide 2","index":2},{"id":256,"title":"Slide 1","index":1}]} for a selection of two slides.

Only applies to apps for PowerPoint when calling the Document.getSelectedData method to get the current slide or selected range of slides.

Office.CoercionType.Table

"table"

Return or set data as tabular data with optional headers.

Data is returned or set as an array of arrays with optional headers.

Note Note

This is only applicable for data in Excel 2013 and Word 2013.

Office.CoercionType.Text

"text"

Return or set data as text (string).

Data is returned or set as a one-dimensional run of characters.

App types

Content apps, Task pane apps

Supported clients

Access app for SharePoint, Excel 2013, Excel Online, and Word 2013.

PowerPoint 2013 supports only Office.CoercionType.Text and Office.CoercionType.SlideRange.

Project Professional 2013 supports only Office.CoercionType.Text.

Library

Office.js

Namespace

Office

Show:
© 2014 Microsoft