[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
 [Expand]What's Installed
 [Expand].NET Core 3 Support
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
  [Collapse]Data Grid
   [Expand]Getting Started
   [Expand]Implementation Details
   [Expand]Grid View Data Layout
   [Expand]Binding to Data
   [Expand]Master-Detail Data Representation
   [Expand]Data Editing and Validation
   [Expand]Filtering and Searching
   [Expand]Data Summaries
   [Expand]Paging and Scrolling
   [Expand]Focus, Navigation, Selection
   [Expand]Conditional Formatting
   [Expand]Appearance Customization
   [Expand]MVVM Enhancements
   [Collapse]Printing and Exporting
     Printing Options
     Customizing the Appearance of Data Cells when Printing or Exporting the Grid
     Grid-Based Report Generation
   [Expand]End-User Interaction
   [Expand]Performance Improvement
   [Expand]Design-Time Features
   [Expand]Visual Elements
   [Expand]End-User Capabilities
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Gantt Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)


The GridControl provides a fast and flexible way to export its data to a file or stream in various formats.

Expanded Overview

A View provides multiple methods to export its contents.

Method Description
DataViewBase.ExportToHtml Exports a grid to the specified file path in HTML format.
DataViewBase.ExportToImage Exports a grid to the specified file path in image format.
DataViewBase.ExportToMht Exports a grid to the specified file path in MHT format
DataViewBase.ExportToPdf Exports a grid to the specified file path in PDF format.
DataViewBase.ExportToRtf Exports a grid to the specified stream in RTF format.
DataViewBase.ExportToText Exports a grid to the specified stream in text format.
DataViewBase.ExportToXps Exports a grid to the specified file path in XPS format.
TableView.ExportToCsv, TreeListView.ExportToCsv, CardView.ExportToCsv Exports a grid to the specified stream in CSV format.
TableView.ExportToXls, TreeListView.ExportToXls, CardView.ExportToXls Exports a grid to the specified file path in XLS format.
TableView.ExportToXlsx, TreeListView.ExportToXlsx, CardView.ExportToXlsx Exports a grid to the specified stream in XLSX format.

The Print Preview window allows you to customize the printed document, print or export it to a file in the required format. The image below illustrates the Print Preview window for a sample grid.

See the Printing Options section of the Printing topic to learn how to specify the View elements to be printed.

Expanded Export to XLS, XLSX, and CSV Formats

Data-aware Export

This is the default export mode, optimized for subsequent analysis of grid data within Microsoft Excel. Output documents retain various data shaping options that are applied within the grid. The data-aware export functionality provides improved performance and memory usage.


Currently CardView does not support the data-aware export.

The GridControl supports the following features for all Excel export operations:

The data-aware export has the following limitations:

  • Only master rows are shown when exporting master-detail data.
  • Printing styles and templates are not supported.
  • Custom summary export is not supported.
  • Icon Sets that are used for conditional formatting are not supported.

You can handle the XlsExportOptionsEx.CustomizeCell / XlsxExportOptionsEx.CustomizeCell event to customize document cells.


In this export mode, resulting documents retain the layout of grid cells. Specific data shaping options are not retained, in comparison to the data-aware export.

Set the ExportSettings.DefaultExportType property to ExportType.WYSIWYG to enable the WYSIWYG export mode in an application.

The following code illustrates the WYSIWYG export to XLSX:


The GridControl uses the Printing-Exporting library to export the data. When you invoke the built-in ExportTo* methods or use the Printing Links, the GridControl produces similar output files. Use the second approach to customize page settings (refer to PrintableControlLink Members for a complete list of available options) or to export the data in a generic way.


You can declare custom Printing Styles and Templates to customize document elements.

Expanded See Also

Is this topic helpful?​​​​​​​