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
- Excel: run
- Excel.AllowEditRange: context
- Excel.AllowEditRangeCollection: context
- Excel.Application: context
- Excel.AutoFilter: context
- Excel.Binding: context
- Excel.BindingCollection: context
- Excel.CellValueConditionalFormat: context
- Excel.Chart: context
- Excel.ChartAreaFormat: context
- Excel.ChartAxes: context
- Excel.ChartAxis: context
- Excel.ChartAxisFormat: context
- Excel.ChartAxisTitle: context
- Excel.ChartAxisTitleFormat: context
- Excel.ChartBinOptions: context
- Excel.ChartBorder: context
- Excel.ChartBoxwhiskerOptions: context
- Excel.ChartCollection: context
- Excel.ChartDataLabel: context
- Excel.ChartDataLabelAnchor: context
- Excel.ChartDataLabelFormat: context
- Excel.ChartDataLabels: context
- Excel.ChartDataTable: context
- Excel.ChartDataTableFormat: context
- Excel.ChartErrorBars: context
- Excel.ChartErrorBarsFormat: context
- Excel.ChartFill: context
- Excel.ChartFont: context
- Excel.ChartFormatString: context
- Excel.ChartGridlines: context
- Excel.ChartGridlinesFormat: context
- Excel.ChartLeaderLines: context
- Excel.ChartLeaderLinesFormat: context
- Excel.ChartLegend: context
- Excel.ChartLegendEntry: context
- Excel.ChartLegendEntryCollection: context
- Excel.ChartLegendFormat: context
- Excel.ChartLineFormat: context
- Excel.ChartMapOptions: context
- Excel.ChartPivotOptions: context
- Excel.ChartPlotArea: context
- Excel.ChartPlotAreaFormat: context
- Excel.ChartPoint: context
- Excel.ChartPointFormat: context
- Excel.ChartPointsCollection: context
- Excel.ChartSeries: context
- Excel.ChartSeriesCollection: context
- Excel.ChartSeriesFormat: context
- Excel.ChartTitle: context
- Excel.ChartTitleFormat: context
- Excel.ChartTrendline: context
- Excel.ChartTrendlineCollection: context
- Excel.ChartTrendlineFormat: context
- Excel.ChartTrendlineLabel: context
- Excel.ChartTrendlineLabelFormat: context
- Excel.ColorScaleConditionalFormat: context
- Excel.Comment: context
- Excel.CommentCollection: context
- Excel.CommentReply: context
- Excel.CommentReplyCollection: context
- Excel.ConditionalDataBarNegativeFormat: context
- Excel.ConditionalDataBarPositiveFormat: context
- Excel.ConditionalFormat: context
- Excel.ConditionalFormatCollection: context
- Excel.ConditionalFormatRule: context
- Excel.ConditionalRangeBorder: context
- Excel.ConditionalRangeBorderCollection: context
- Excel.ConditionalRangeFill: context
- Excel.ConditionalRangeFont: context
- Excel.ConditionalRangeFormat: context
- Excel.CultureInfo: context
- Excel.CustomConditionalFormat: context
- Excel.CustomFunctionManager: context
- Excel.CustomProperty: context
- Excel.CustomPropertyCollection: context
- Excel.CustomXmlPart: context
- Excel.CustomXmlPartCollection: context
- Excel.CustomXmlPartScopedCollection: context
- Excel.DataBarConditionalFormat: context
- Excel.DataConnectionCollection: context
- Excel.DataPivotHierarchy: context
- Excel.DataPivotHierarchyCollection: context
- Excel.DataValidation: context
- Excel.DatetimeFormatInfo: context
- Excel.DocumentProperties: context
- Excel.DocumentTask: context
- Excel.DocumentTaskChange: context
- Excel.DocumentTaskChangeCollection: context
- Excel.DocumentTaskCollection: context
- Excel.Filter: context
- Excel.FilterPivotHierarchy: context
- Excel.FilterPivotHierarchyCollection: context
- Excel.FormatProtection: context
- Excel.FunctionResult: context
- Excel.Functions: context
- Excel.GeometricShape: context
- Excel.GroupShapeCollection: context
- Excel.HeaderFooter: context
- Excel.HeaderFooterGroup: context
- Excel.HeaderFooterPicture: context
- Excel.IconSetConditionalFormat: context
- Excel.Image: context
- Excel.IterativeCalculation: context
- Excel.Line: context
- Excel.LinkedEntityDataDomain: context
- Excel.LinkedEntityDataDomainCollection: context
- Excel.LinkedWorkbook: context
- Excel.LinkedWorkbookCollection: context
- Excel.LocalImage: context
- Excel.NamedItem: context
- Excel.NamedItemArrayValues: context
- Excel.NamedItemCollection: context
- Excel.NamedSheetView: context
- Excel.NamedSheetViewCollection: context
- Excel.Note: context
- Excel.NoteCollection: context
- Excel.NumberFormatInfo: context
- Excel.PageBreak: context
- Excel.PageBreakCollection: context
- Excel.PageLayout: context
- Excel.Pane: context
- Excel.PaneCollection: context
- Excel.PivotField: context
- Excel.PivotFieldCollection: context
- Excel.PivotHierarchy: context
- Excel.PivotHierarchyCollection: context
- Excel.PivotItem: context
- Excel.PivotItemCollection: context
- Excel.PivotLayout: context
- Excel.PivotTable: context
- Excel.PivotTableCollection: context
- Excel.PivotTableScopedCollection: context
- Excel.PivotTableStyle: context
- Excel.PivotTableStyleCollection: context
- Excel.PresetCriteriaConditionalFormat: context
- Excel.Query: context
- Excel.QueryCollection: context
- Excel.Range: context
- Excel.RangeAreas: context
- Excel.RangeAreasCollection: context
- Excel.RangeBorder: context
- Excel.RangeBorderCollection: context
- Excel.RangeCollection: context
- Excel.RangeFill: context
- Excel.RangeFont: context
- Excel.RangeFormat: context
- Excel.RangeSort: context
- Excel.RangeView: context
- Excel.RangeViewCollection: context
- Excel.RemoveDuplicatesResult: context
- Excel.RowColumnPivotHierarchy: context
- Excel.RowColumnPivotHierarchyCollection: context
- Excel.Runtime: context
- Excel.Setting: context
- Excel.SettingCollection: context
- Excel.Shape: context
- Excel.ShapeCollection: context
- Excel.ShapeFill: context
- Excel.ShapeFont: context
- Excel.ShapeGroup: context
- Excel.ShapeLineFormat: context
- Excel.Slicer: context
- Excel.SlicerCollection: context
- Excel.SlicerItem: context
- Excel.SlicerItemCollection: context
- Excel.SlicerStyle: context
- Excel.SlicerStyleCollection: context
- Excel.Style: context
- Excel.StyleCollection: context
- Excel.Table: context
- Excel.TableChangedEventArgs: getRange, getRangeOrNullObject
- Excel.TableCollection: context
- Excel.TableColumn: context
- Excel.TableColumnCollection: context
- Excel.TableRow: context
- Excel.TableRowCollection: context
- Excel.TableScopedCollection: context
- Excel.TableSort: context
- Excel.TableStyle: context
- Excel.TableStyleCollection: context
- Excel.TextConditionalFormat: context
- Excel.TextFrame: context
- Excel.TextRange: context
- Excel.TimelineStyle: context
- Excel.TimelineStyleCollection: context
- Excel.TopBottomConditionalFormat: context
- Excel.Window: context
- Excel.WindowCollection: context
- Excel.Workbook: context
- Excel.WorkbookCreated: context
- Excel.WorkbookProtection: context
- Excel.WorkbookRangeAreas: context
- Excel.Worksheet: context
- Excel.WorksheetChangedEventArgs: getRange, getRangeOrNullObject
- Excel.WorksheetCollection: context
- Excel.WorksheetCustomProperty: context
- Excel.WorksheetCustomPropertyCollection: context
- Excel.WorksheetFormatChangedEventArgs: getRange, getRangeOrNullObject
- Excel.WorksheetFreezePanes: context
- Excel.WorksheetProtection: context
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 |
Properties
| application | |
| runtime | |
| workbook |
Methods
| setInvocation(invocation) |
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
runtime
workbook
Method Details
setInvocation(invocation)
setInvocation(invocation: {
invocationId: number;
isInSyncExecution: boolean;
}): void;
Parameters
- invocation
-
{ invocationId: number; isInSyncExecution: boolean; }
Returns
void
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Office Add-ins
Feedback
Was this page helpful?
