# Excel Export

The PivotGridV2 provides built-in Excel export capabilities.

To use the Excel export feature, reference the JSZip library before the Kendo UI JavaScript files in the `_Layout.cshtml`. For more information, refer to the Excel export [requirements](https://www.telerik.com/aspnet-core-ui/documentation/installation/system-requirements/export-support#jszip-library).

## General

To export the PivotGridV2, call the [`saveAsExcel()`](https://www.telerik.com/kendo-jquery-ui/documentation/api/ui/pivotgrid/methods/saveasexcel) client-side API method of the component.

```JS script
<script>
    function buttonClick() {
        var pivotgrid = $("#pivotgrid").data("kendoPivotGridV2");
        pivotgrid.saveAsExcel(); 
    }
</script>
```

The PivotGridV2 also provides an Excel configuration that allows you to set additional options, such as the name of the generated file or the proxy URL.

```Razor HtmlHelper
    @(Html.Kendo().PivotGridV2()
        .Name("pivotgrid")
        .Excel(excel => excel
            .FileName("Kendo UI PivotGridV2 Export.xlsx")
            .Filterable(true)
            .ProxyURL(Url.Action("Excel_Export_Save", "Home"))
        )
        //... Other configuration ...
    )
```

```Razor TagHelper
    <kendo-pivotgridv2 name="pivotgrid" column-width="200" height="580">
        <excel proxy-url="@Url.Action("Excel_Export_Save","Home")" filterable="true" file-name="Kendo UI PivotGridV2 Export.xlsx" />
        //... Other configuration ...
    </kendo-pivotgridv2>
```

## Next Steps

* [Configuring the export to Excel](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/pivotgridv2builder)
* [Exporting the PivotGridV2 to Excel (demo)](https://demos.telerik.com/aspnet-core/pivotgridv2/excel-export)

## See Also

* [PDF Export by the PivotGridV2 HtmlHelper for ASP.NET Core (Demo)](https://demos.telerik.com/aspnet-core/pivotgrid/pdf-export)
* [Server-Side API](https://www.telerik.com/aspnet-core-ui/documentation/api/pivotgridv2)
