Javascript Spreadsheet Ribbon

28 Sep 20202 minutes to read

A ribbon is a command bar that organizes a Spreadsheet’s features into a series of tabs at the top of the control.

Ribbon Customization

You can perform the Ribbon customization in the following two ways.

1) Initial Load

2) Methods

Initial Load

The Ribbon customization can be done at Initial load by using ribbonSettings API. In ribbonSettings applicationTab options is available for ribbon customization.

Application Tab

To set application tab in Spreadsheet, applicationTab property is used. The following options are available in applicationTab settings.

  • type is used to set application tab type in Spreadsheet.
  • menuSettings is used to indicate menu settings for application tab in Spreadsheet. The following options are available in menuSettings.

    1) isAppend is used to enable or disable isAppend property in ribbon settings.

    2) dataSource is used to specify the data source to append in application tab.

Methods

You can also customize the ribbon by using the following methods.

Feature Method Name Description
Add BackStage Item

addBackStageItem

To add a new item in the backstage.
Add Contextual Tabs

addContextualTabs

To add the contextual tabs in the ribbon.
Add Menu Item

addMenuItem

To dynamically add the menu item in the file menu.
Add Tab

addTab

To dynamically add the tab in the ribbon.
Add Tab Group

addTabGroup

To dynamically add the tab group in the ribbon.
Auto Sum

autoSum

To insert the few type (SUM, MAX, MIN, AVG, COUNT) of formulas in the selected range of cells in the Spreadsheet.
Change Dimension

changeDimension

To change the dimensions for chart/picture.
Disable Ribbon Items

disableRibbonItems

To disable ribbon items in the Spreadsheet.
Enable Ribbon Items

enableRibbonItems

To enable ribbon items in the Spreadsheet.
Hide Menu

hideMenu

To hide the file menu in the ribbon tab.
Remove BackStage Item

removeBackStageItem

To remove the item from the backstage in the Spreadsheet.
Remove Menu Item

removeMenuItem

To remove the menu item from file menu in Spreadsheet.
Remove Tab

removeTab

To remove the tab from ribbon in the spreadsheet.
Remove Tab Group

removeTabGroup

To remove the tab group from ribbon in the Spreadsheet.
Show Menu

showMenu

To show the file menu in the ribbon tab.
Update Menu Item

updateMenuItem

To update the menu item in the file menu.
Update Ribbon Icons

updateRibbonIcons

To update the ribbon icons in the Spreadsheet.