Excel.LocalImage class
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Provides information about the local image.
- Extends
Remarks
[ API set: ExcelApi BETA (PREVIEW ONLY) ]
Properties
context | The request context associated with the object. This connects the add-in's process to the Office host application's process. |
Methods
get |
Gets the Base64-encoded image data stored in the shared image cache with the cache unique identifier (UID). |
toJSON() | Overrides the JavaScript |
Property Details
context
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
The request context associated with the object. This connects the add-in's process to the Office host application's process.
context: RequestContext;
Property Value
Method Details
getBase64EncodedImageData(cacheUid)
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Gets the Base64-encoded image data stored in the shared image cache with the cache unique identifier (UID).
getBase64EncodedImageData(cacheUid: string): OfficeExtension.ClientResult<string>;
Parameters
- cacheUid
-
string
Represents the unique identifier (UID) of the image as it appears in the cache. The cache UID can be obtained from JSON representation of the values in the cell.
Returns
OfficeExtension.ClientResult<string>
The Base64-encoded image data.
Remarks
toJSON()
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Overrides the JavaScript toJSON()
method in order to provide more useful output when an API object is passed to JSON.stringify()
. (JSON.stringify
, in turn, calls the toJSON
method of the object that is passed to it.) Whereas the original Excel.LocalImage
object is an API object, the toJSON
method returns a plain JavaScript object (typed as Excel.Interfaces.LocalImageData
) that contains shallow copies of any loaded child properties from the original object.
toJSON(): {
[key: string]: string;
};
Returns
{ [key: string]: string; }
Office Add-ins