Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Excel.RequestContext class

Package:
excel

The RequestContext object facilitates requests to the Excel application. Since the Office add-in and the Excel application run in two different processes, the request context is required to get access to the Excel object model from the add-in.

Remarks

Used by

Examples

// *.run methods automatically create an OfficeExtension.ClientRequestContext
// object to work with the Office file.
await Excel.run(async (context: Excel.RequestContext) => {
 const workbook = context.workbook;
 // Interact with the Excel workbook...
});

Constructors

(constructor)(url, invocation)

Constructs a new instance of the RequestContext class

Constructor Details

(constructor)(url, invocation)

Constructs a new instance of the RequestContext class

constructor(url?: string | Session, invocation?: {
 invocationId: number;
 isInSyncExecution: boolean;
 });

Parameters

url

string | Excel.Session

invocation

{ invocationId: number; isInSyncExecution: boolean; }

Property Details

application

readonly application: Application;

Property Value

runtime

API set: ExcelApi 1.5

readonly runtime: Runtime;

Property Value

workbook

readonly workbook: Workbook;

Property Value

Method Details

setInvocation(invocation)

setInvocation(invocation: {
 invocationId: number;
 isInSyncExecution: boolean;
 }): void;

Parameters

invocation

{ invocationId: number; isInSyncExecution: boolean; }

Returns

void


Feedback

Was this page helpful?