
# Pivot context menu

When you click the menu icon in the upper left corner of the pivot, the menu set in contextMenu is displayed.

#### Pivot context menu settings

Specify the menu to be displayed when clicking the button located at the top left using the [setGlobalContextMenu()](http://help.realgrid.com/pivotApi/RealPivot/setContextMenu/) function.

Use the [setContextMenu()](http://help.realgrid.com/pivotApi/RealPivot/setContextMenu/) function to specify the menu to be displayed when right-clicking on the remaining area excluding the button located at the top left.

<GridView demo='pivotguides/07-pivotContextMenu/01' height={600}/>

```js
pivot.setGlobalContextMenu([{
     text: "Save Excel",
     callback: function(){
         pivot.exportGrid({
             type: "excel",
             target: "local",
             fileName: "RealPivotExport.xlsx"
         });
     }
}])

pivot.setContextMenu([{
     text: "Save Excel",
     callback: function(){
         pivot.exportGrid({
             type: "excel",
             target: "local",
             fileName: "RealPivotExport.xlsx"
         });
     }
}])
```