Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The ExcelApiDesktop requirement set is a special requirement set that includes features that are only available for Excel on Windows, on Mac, and on iPad. APIs in this requirement set are considered to be production APIs for the Excel application on Windows, on Mac, and on iPad. They follow Microsoft 365 developer support policies. ExcelApiDesktop APIs are considered to be "preview" APIs for other platforms (web) and may not be supported by any of those platforms.
When APIs in the ExcelApiDesktop requirement set are supported across all platforms, they'll be added to the next released requirement set (ExcelApi 1.[NEXT]). Once that new requirement set is public, those APIs will also continue to be tagged in this ExcelApiDesktop requirement set. To learn more about platform-specific requirements in general, see Understanding platform-specific requirement sets.
Important
ExcelApiDesktop 1.1 is a desktop-only requirement set. It's a superset of the ExcelApi 1.20.
Recommended usage
Because the ExcelApiDesktop 1.1 APIs are only supported by Excel on Windows, on Mac, and on iPad, your add-in should check if the requirement set is supported before calling these APIs. This avoids any attempt to use desktop-only APIs on an unsupported platform.
if (Office.context.requirements.isSetSupported("ExcelApiDesktop", "1.1")) {
// Any API exclusive to this ExcelApiDesktop requirement set.
}
Once the API is in a cross-platform requirement set, you should remove or edit the isSetSupported check. This will enable your add-in's feature on other platforms. Be sure to test the feature on those platforms when making this change.
Important
Your manifest cannot specify ExcelApiDesktop 1.1 as an activation requirement. It isn't a valid value to use in the Set element.
API list
The following table lists the Excel JavaScript APIs currently included in the ExcelApiDesktop 1.1 requirement set. For a complete list of all Excel JavaScript APIs (including ExcelApiDesktop 1.1 APIs and previously released APIs), see all Excel JavaScript APIs.
| Class | Fields | Description |
|---|---|---|
| Application | activeWindow | Returns a window object that represents the active window (the window on top). |
| checkSpelling(word: string, options?: Excel.CheckSpellingOptions) | Checks the spelling of a single word. | |
| enterEditingMode() | Enters editing mode for the selected range in the active worksheet. | |
| union(firstRange: Range | RangeAreas, secondRange: Range | RangeAreas, ...additionalRanges: (Range | RangeAreas)[]) | Returns a RangeAreas object that represents the union of two or more Range or RangeAreas objects. |
|
| windows | Returns all the open Excel windows. | |
| CheckSpellingOptions | customDictionary | Optional. |
| ignoreUppercase | Optional. | |
| HeaderFooter | centerFooterPicture | Gets a HeaderFooterPicture object that represents the picture for the center section of the footer. |
| centerHeaderPicture | Gets a HeaderFooterPicture object that represents the picture for the center section of the header. |
|
| leftFooterPicture | Gets a HeaderFooterPicture object that represents the picture for the left section of the footer. |
|
| leftHeaderPicture | Gets a HeaderFooterPicture object that represents the picture for the left section of the header. |
|
| rightFooterPicture | Gets a HeaderFooterPicture object that represents the picture for the right section of the footer. |
|
| rightHeaderPicture | Gets a HeaderFooterPicture object that represents the picture for the right section of the header. |
|
| HeaderFooterPicture | brightness | Specifies the brightness of the picture. |
| colorType | Specifies the type of color transformation of the picture. | |
| contrast | Specifies the contrast of the picture. | |
| cropBottom | Specifies the number of points that are cropped off the bottom of the picture. | |
| cropLeft | Specifies the number of points that are cropped off the left side of the picture. | |
| cropRight | Specifies the number of points that are cropped off the right side of the picture. | |
| cropTop | Specifies the number of points that are cropped off the top of the picture. | |
| filename | Specifies the URL (on the intranet or the web) or path (local or network) to the location where the source object is saved. | |
| height | Specifies the height of the picture in points. | |
| lockAspectRatio | Specifies a value that indicates whether the picture retains its original proportions when resized. | |
| width | Specifies the width of the picture in points. | |
| Image | brightness | Specifies the brightness of the image. |
| colorType | Specifies the type of color transformation applied to the image. | |
| contrast | Specifies the contrast of the image. | |
| cropBottom | Specifies the number of points that are cropped off the bottom of the image. | |
| cropLeft | Specifies the number of points that are cropped off the left side of the image. | |
| cropRight | Specifies the number of points that are cropped off the right side of the image. | |
| cropTop | Specifies the number of points that are cropped off the top of the image. | |
| incrementBrightness(increment: number) | Increments the brightness of the image by a specified amount. | |
| incrementContrast(increment: number) | Increments the contrast of the image by a specified amount. | |
| PageLayout | alignMarginsHeaderFooter | Specifies whether Excel aligns the header and the footer with the margins set in the page setup options. |
| printQuality | Specifies a two-element array that contains both horizontal and vertical print quality values. | |
| Pane | index | Returns index of the pane. |
| PaneCollection | getCount() | Returns the number of panes in the collection. |
| getItemAt(index: number) | Gets the pane in the collection by index. | |
| items | Gets the loaded child items in this collection. | |
| Range | checkSpelling(options?: Excel.CheckSpellingOptions) | Checks the spelling of words in this range. |
| formulaArray | Specifies the array formula of a range. | |
| showDependents(remove?: boolean) | Draws tracer arrows to the direct dependents of the range. | |
| showPrecedents(remove?: boolean) | Draws tracer arrows to the direct precedents of the range. | |
| Window | activate() | Activates the window. |
| activateNext() | Activates the next window. | |
| activatePrevious() | Activates the previous window. | |
| activeCell | Gets the active cell in the window. | |
| activePane | Gets the active pane in the window. | |
| activeWorksheet | Gets the active worksheet in the window. | |
| autoFilterDateGroupingEnabled | Specifies whether AutoFilter date grouping is enabled in the window. | |
| close() | Closes the window. | |
| enableResize | Specifies whether resizing is enabled for the window. | |
| freezePanes | Specifies whether panes are frozen in the window. | |
| height | Specifies the height of the window. | |
| index | Gets the index of the window. | |
| isVisible | Specifies whether the window is visible. | |
| largeScroll(Down: number, Up: number, ToRight: number, ToLeft: number) | Scrolls the window by multiple pages. | |
| left | Specifies the distance, in points, from the left edge of the computer screen to the left edge of the window. | |
| name | Specifies the name of the window. | |
| newWindow() | Opens a new Excel window. | |
| panes | Gets a collection of panes associated with the window. | |
| pointsToScreenPixelsX(Points: number) | Converts horizontal points to screen pixels. | |
| pointsToScreenPixelsY(Points: number) | Converts vertical points to screen pixels. | |
| scrollColumn | Specifies the scroll column of the window. | |
| scrollIntoView(Left: number, Top: number, Width: number, Height: number, Start?: boolean) | Scrolls the window to bring the specified range into view. | |
| scrollRow | Specifies the scroll row of the window. | |
| scrollWorkbookTabs(Sheets?: number, Position?: Excel.ScrollWorkbookTabPosition) | Scrolls the workbook tabs. | |
| showFormulas | Specifies whether formulas are shown in the window. | |
| showGridlines | Specifies whether gridlines are shown in the window. | |
| showHeadings | Specifies whether headings are shown in the window. | |
| showHorizontalScrollBar | Specifies whether the horizontal scroll bar is shown in the window. | |
| showOutline | Specifies whether outline is shown in the window. | |
| showRightToLeft | Gets the right-to-left layout value of the window. | |
| showRuler | Specifies whether the ruler is shown in the window. | |
| showVerticalScrollBar | Specifies whether the vertical scroll bar is shown in the window. | |
| showWhitespace | Specifies whether whitespace is shown in the window. | |
| showWorkbookTabs | Specifies whether workbook tabs are shown in the window. | |
| showZeros | Specifies whether zeroes are shown in the window. | |
| smallScroll(Down: number, Up: number, ToRight: number, ToLeft: number) | Scrolls the window by a number of rows or columns. | |
| split | Specifies the split state of the window. | |
| splitColumn | Specifies the split column of the window. | |
| splitHorizontal | Specifies the horizontal split of the window. | |
| splitRow | Specifies the split row of the window. | |
| splitVertical | Specifies the vertical split of the window. | |
| tabRatio | Specifies the tab ratio of the window. | |
| top | Specifies the distance, in points, from the top edge of the window to the top edge of the usable area (below the menus, any toolbars docked at the top, and the formula bar). | |
| type | Specifies the type of the window. | |
| usableHeight | Gets the usable height of the window. | |
| usableWidth | Gets the usable width of the window. | |
| view | Specifies the view of the window. | |
| visibleRange | Gets the visible range of the window. | |
| width | Specifies the display width of the window. | |
| windowNumber | Gets the window number. | |
| windowState | Specifies the window state. | |
| zoom | Specifies an integer value that represents the display size of the window. | |
| WindowCollection | breakSideBySide() | Breaks the side-by-side view of windows. |
| compareCurrentSideBySideWith(windowName: string) | Compares the current window side by side with the specified window. | |
| getCount() | Gets the number of windows in the collection. | |
| getItemAt(index: number) | Gets the Window in the collection by index. | |
| items | Gets the loaded child items in this collection. | |
| resetPositionsSideBySide() | Resets the positions of windows in side-by-side view. | |
| Workbook | focus() | Sets focus on the workbook. |
| Worksheet | checkSpelling(options?: Excel.CheckSpellingOptions) | Checks the spelling of words in this worksheet. |
| clearArrows() | Clears the tracer arrows from the worksheet. | |
| evaluate(name: string) | Returns the evaluation result of a formula string. |
See also
Office Add-ins