export

Specifies options for exporting pivot grid data.

Type:

Object

When exporting is enabled, the new 'Export to Excel file' entity is added to the context menu. You can specify exporting options using this object.

NOTE
Exporting features require the JSZip library. Please add a reference to this library to your page. You can get it from the js folder of your DevExtreme Package or use the DevExpress CDN as shown below.
HTML
<script type="text/javascript" src="https://cdn3.devexpress.com/jslib/15.2.15/js/jszip.min.js"></script>
Show Example:
AngularJS
Knockout
jQuery

In this demo, click the export icon in the upper-left corner to export the pivot grid. [note] This example will not work in IE8, IE9 and Safari.


                                    

                                    

In this demo, click the export icon in the upper-left corner to export the pivot grid. [note] This example will not work in IE8, IE9 and Safari.


                                    

                                    

In this demo, click the export icon in the upper-left corner to export the pivot grid. [note] This example will not work in IE8, IE9 and Safari.


                                    

                                    

enabled

Indicates whether the export feature is enabled for the pivot grid.

Type:

Boolean

Default Value: false

Show Example:
AngularJS
Knockout
jQuery

Use the switch below the pivot grid to enable/disable the export feature. [note] This example will not work in IE8, IE9 and Safari.


                                    

                                    

Use the switch below the pivot grid to enable/disable the export feature. [note] This example will not work in IE8, IE9 and Safari.


                                    

                                    

Use the switch below the pivot grid to enable/disable the export feature. [note] This example will not work in IE8, IE9 and Safari.


                                    

                                    

fileName

Specifies a default name for the file to which grid data is exported.

Type:

String

Default Value: 'PivotGrid'

Show Example:
AngularJS
Knockout
jQuery

In this demo, you can change the name of the exported file at runtime. Type any text in the text box below the pivot grid. Then, export the grid using the icon in its upper-left corner. The exported file will have the exact name you have typed. [note] This example will not work in IE8, IE9 and Safari.


                                    

                                    

In this demo, you can change the name of the exported file at runtime. Type any text in the text box below the pivot grid. Then, export the grid using the icon in its upper-left corner. The exported file will have the exact name you have typed. [note] This example will not work in IE8, IE9 and Safari.


                                    

                                    

In this demo, you can change the name of the exported file at runtime. Type any text in the text box below the pivot grid. Then, export the grid using the icon in its upper-left corner. The exported file will have the exact name you have typed. [note] This example will not work in IE8, IE9 and Safari.


                                    

                                    

proxyUrl

Specifies the URL of the server-side proxy that streams the resulting file to the end user to enable export in IE8, IE9 and Safari browsers.

Type:

String

Default Value: undefined

Generally, exporting is performed using client-side API in browsers. However, the IE8, IE9 and Safari (integrated in Mac OS) browsers do not implement an API for saving files. In this instance, the dxPivotGrid widget can POST the content to a server-side proxy, which will stream the file back to the end user. To enable this functionality, set the export | proxyUrl option to the proxy, which will stream the file to the end user. When implementing the proxy, take the following information into account.

  • Your proxy will receive a POST request with the following parameters in the request body: fileName, contentType (the MIME type of the file) and base64 (the base-64 encoded file content).
  • The proxy should return the decoded file with the "Content-Disposition" header set to attachment; filename="".

The sample proxy implementation for ASPx-based and PHP-based web servers is presented in the Data Grid | Export article.