Office.Slice interface

Represents a slice of a document file.

Remarks

Requirement SetsFile

The Slice object is accessed with the File.getSliceAsync method.

Support details

A capital Y in the following matrix indicates that this interface is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this interface.

For more information about Office host application and server requirements, see Requirements for running Office Add-ins.

Supported hosts, by platform

Office for Windows desktop Office Online (in browser) Office for iPad
PowerPoint Y Y Y
Word Y Y Y

Properties

data

Gets the raw data of the file slice in Office.FileType.Text ("text") or Office.FileType.Compressed ("compressed") format as specified by the fileType parameter of the call to the Document.getFileAsync method.

index

Gets the zero-based index of the file slice.

size

Gets the size of the slice in bytes.

Property Details

data

Gets the raw data of the file slice in Office.FileType.Text ("text") or Office.FileType.Compressed ("compressed") format as specified by the fileType parameter of the call to the Document.getFileAsync method.

data: any;
Property Value
any
Remarks

Files in the "compressed" format will return a byte array that can be transformed to a base64-encoded string if required.

index

Gets the zero-based index of the file slice.

index: number;
Property Value
number

size

Gets the size of the slice in bytes.

size: number;
Property Value
number