Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]Controls and Libraries
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Collapse]API Reference
  [Expand]DevExpress.Charts.Designer
  [Expand]DevExpress.Mvvm.UI
  [Expand]DevExpress.Mvvm.UI.Interactivity
  [Expand]DevExpress.Mvvm.UI.ModuleInjection
  [Expand]DevExpress.Xpf.Accordion
  [Expand]DevExpress.Xpf.Bars
  [Expand]DevExpress.Xpf.Carousel
  [Expand]DevExpress.Xpf.Charts
  [Expand]DevExpress.Xpf.Charts.Localization
  [Expand]DevExpress.Xpf.Charts.RangeControlClient
  [Expand]DevExpress.Xpf.ChunkList
  [Expand]DevExpress.Xpf.Controls
  [Expand]DevExpress.Xpf.Core
  [Expand]DevExpress.Xpf.Core.ConditionalFormatting
  [Expand]DevExpress.Xpf.Core.DataSources
  [Expand]DevExpress.Xpf.Core.ServerMode
  [Expand]DevExpress.Xpf.Data
  [Expand]DevExpress.Xpf.DataAccess
  [Expand]DevExpress.Xpf.DataAccess.DataSourceWizard
  [Expand]DevExpress.Xpf.Diagram
  [Expand]DevExpress.Xpf.Docking
  [Expand]DevExpress.Xpf.Docking.Base
  [Expand]DevExpress.Xpf.DocumentViewer
  [Expand]DevExpress.Xpf.Editors
  [Expand]DevExpress.Xpf.Editors.DateNavigator
  [Expand]DevExpress.Xpf.Editors.ExpressionEditor
  [Expand]DevExpress.Xpf.Editors.Filtering
  [Expand]DevExpress.Xpf.Editors.Flyout
  [Expand]DevExpress.Xpf.Editors.Flyout.Native
  [Expand]DevExpress.Xpf.Editors.Helpers
  [Expand]DevExpress.Xpf.Editors.Popups
  [Expand]DevExpress.Xpf.Editors.RangeControl
  [Expand]DevExpress.Xpf.Editors.Settings
  [Expand]DevExpress.Xpf.Editors.Validation
  [Expand]DevExpress.Xpf.Gauges
  [Expand]DevExpress.Xpf.Gauges.Localization
  [Collapse]DevExpress.Xpf.Grid
    AutoFilterCondition Enumeration
    AutoGenerateColumnsMode Enumeration
   [Expand]BandBase Class
   [Expand]BaseColumn Class
   [Expand]BaseGridColumnHeader Class
    BestFitArea Enumeration
   [Expand]CardData Class
   [Expand]CardHeaderData Class
    CardLayout Enumeration
   [Expand]CardView Class
   [Expand]CardViewCommands Class
   [Expand]CardViewHitInfo Class
    CardViewHitTest Enumeration
    CardViewSelectMode Enumeration
   [Expand]CellContentPresenter Class
   [Expand]CellMergeEventArgs Class
   [Expand]CellValueChangedEventArgs Class
    CellValueChangedEventHandler Delegate
   [Expand]CellValueEventArgs Class
    CellValueEventHandler Delegate
    ClipboardCopyMode Enumeration
    ClipboardCopyOptions Enumeration
    ClipboardMode Enumeration
   [Expand]ColorScaleFormatCondition Class
   [Expand]ColumnBase Class
   [Expand]ColumnChooserControl Class
   [Expand]ColumnDataEventArgsBase Class
    ColumnFilterMode Enumeration
    ColumnFilterPopupMode Enumeration
    ColumnPosition Enumeration
   [Expand]ContentDetailDescriptor Class
   [Expand]CopyingToClipboardEventArgs Class
   [Expand]CopyingToClipboardEventArgsBase Class
    CopyingToClipboardEventHandler Delegate
   [Expand]CustomBestFitEventArgs Class
   [Expand]CustomBestFitEventArgsBase Class
    CustomBestFitEventHandler Delegate
   [Expand]CustomCellAppearanceEventArgs Class
   [Expand]CustomColumnDisplayTextEventArgs Class
    CustomColumnDisplayTextEventHandler Delegate
   [Expand]CustomColumnSortEventArgs Class
    CustomColumnSortEventHandler Delegate
   [Expand]CustomDataUpdateFormatConditionEventArgs Class
   [Expand]CustomFilterDisplayTextEventArgs Class
    CustomFilterDisplayTextEventHandler Delegate
   [Expand]CustomGroupDisplayTextEventArgs Class
    CustomGroupDisplayTextEventHandler Delegate
   [Expand]CustomRowAppearanceEventArgs Class
   [Expand]DataBarFormatCondition Class
   [Expand]DataControlBase Class
   [Expand]DataControlDetailDescriptor Class
   [Expand]DataControlSerializationOptions Class
   [Expand]DataUpdateFormatCondition Class
   [Expand]DataViewBase Class
   [Expand]DataViewCommandsBase Class
   [Expand]DefaultColumnMenuItemNames Class
   [Expand]DefaultSummaryMenuItemNames Class
   [Expand]DetailDescriptorBase Class
   [Expand]DetailDescriptorCollection Class
    EditFormPostMode Enumeration
   [Expand]EditFormShowingEventArgs Class
    EditFormShowMode Enumeration
   [Expand]EditGridCellData Class
    EditorButtonShowMode Enumeration
   [Expand]EditorEventArgs Class
   [Expand]EditorEventArgsBase Class
    EditorEventHandler Delegate
    ErrorsWatchMode Enumeration
   [Expand]ExcelColumnFilterSettings Class
    ExceptionMode Enumeration
   [Expand]ExpressionConditionBase Class
   [Expand]FilterEditorEventArgs Class
    FilterEditorEventHandler Delegate
   [Expand]FilterPopupEventArgs Class
    FilterPopupEventHandler Delegate
    FilterPopupMode Enumeration
    FixedRowPosition Enumeration
    FixedStyle Enumeration
   [Expand]FocusedRowChangedEventArgs Class
    FocusedRowChangedEventHandler Delegate
   [Expand]FormatCondition Class
   [Expand]FormatConditionBase Class
   [Expand]FormatConditionCollection Class
   [Expand]GridBandMenuInfo Class
   [Expand]GridCell Class
   [Expand]GridCellData Class
   [Expand]GridCellValidationEventArgs Class
    GridCellValidationEventHandler Delegate
   [Expand]GridColumn Class
   [Expand]GridColumnCollection Class
   [Expand]GridColumnCommands Class
   [Expand]GridColumnData Class
   [Expand]GridColumnDataEventArgs Class
    GridColumnDataEventHandler Delegate
   [Expand]GridColumnHeader Class
   [Expand]GridColumnHeaderBase Class
   [Expand]GridColumnWidth Structure
   [Expand]GridCommands Class
   [Expand]GridControl Class
   [Expand]GridControlBand Class
   [Expand]GridControlBandsLayout Class
   [Expand]GridControlLocalizer Class
    GridControlRuntimeStringId Enumeration
    GridControlStringId Enumeration
   [Expand]GridDataBase Class
   [Expand]GridDataViewBase Class
   [Expand]GridGroupSummaryData Class
   [Expand]GridGroupSummarySortInfo Class
   [Expand]GridGroupSummarySortInfoCollection Class
   [Expand]GridMenuEventArgs Class
    GridMenuEventHandler Delegate
   [Expand]GridMenuInfo Class
    GridMenuType Enumeration
   [Expand]GridPopupMenu Class
   [Expand]GridRowContent Class
   [Expand]GridRowValidationEventArgs Class
    GridRowValidationEventHandler Delegate
   [Expand]GridSelectionChangedEventArgs Class
    GridSelectionChangedEventHandler Delegate
   [Expand]GridSerializationOptions Class
   [Expand]GridSortInfo Class
   [Expand]GridSortInfoCollection Class
   [Expand]GridSummaryData Class
   [Expand]GridSummaryItem Class
    GridSummaryItemAlignment Enumeration
   [Expand]GridSummaryItemCollection Class
   [Expand]GridTotalSummaryData Class
   [Expand]GridViewBase Class
   [Expand]GridViewCommandsBase Class
   [Expand]GridViewHitInfoBase Class
    GridViewNavigationStyle Enumeration
   [Expand]GroupRowData Class
    GroupSummaryDisplayMode Enumeration
    HeaderPresenterType Enumeration
   [Expand]HeadersData Class
   [Expand]IconSetFormatCondition Class
    IncrementalSearchMode Enumeration
   [Expand]IndicatorFormatConditionBase Class
    IndicatorState Enumeration
   [Expand]InitNewRowEventArgs Class
    InitNewRowEventHandler Delegate
   [Expand]InvalidRowExceptionEventArgs Class
    InvalidRowExceptionEventHandler Delegate
   [Expand]LightweightCellEditor Class
   [Expand]LightweightCellEditorBase Class
    MergedGroupingMode Enumeration
    MergeGroupPosition Enumeration
   [Expand]MultiDetailDescriptor Class
    MultiSelectMode Enumeration
    NewItemRowPosition Enumeration
    PostConfirmationMode Enumeration
   [Expand]RowAllowEventArgs Class
    RowAllowEventHandler Delegate
    RowAnimationKind Enumeration
   [Expand]RowControl Class
   [Expand]RowData Class
   [Expand]RowDataBase Class
    RowDetailsVisibilityMode Enumeration
   [Expand]RowDoubleClickEventArgs Class
    RowDoubleClickEventHandler Delegate
   [Expand]RowEventArgs Class
    RowEventHandler Delegate
    RowFixingPosition Enumeration
    RowPosition Enumeration
    ScrollAnimationMode Enumeration
    ScrollBarAnnotationAlignment Enumeration
   [Expand]ScrollBarAnnotationInfo Class
    ScrollBarAnnotationMode Enumeration
   [Expand]ScrollBarAnnotationRowInfo Class
   [Expand]ScrollBarAnnotationsAppearance Class
   [Expand]ScrollBarAnnotationsCreatingEventArgs Class
   [Expand]ScrollBarCustomRowAnnotationEventArgs Class
    ScrollingMode Enumeration
    ScrollMode Enumeration
   [Expand]SelectedRowsCollection Class
    SelectionState Enumeration
    ShowFilterPanelMode Enumeration
    ShowFixRowButton Enumeration
   [Expand]ShowingEditorEventArgs Class
   [Expand]ShowingEditorEventArgsBase Class
    ShowingEditorEventHandler Delegate
    ShowSearchPanelMode Enumeration
   [Expand]SummaryItemBase Class
   [Collapse]TableView Class
     TableView Members
    [Expand]TableView Constructor
    [Expand]TableView Properties
    [Expand]TableView Events
    [Collapse]TableView Methods
      AddFormatCondition Method
      AddNewRow Method
      BestFitColumn Method
      BestFitColumns Method
      CalcColumnBestFitWidth Method
     [Expand]CalcHitInfo Method
      ClearFormatConditionsFromAllColumns Method
      ClearFormatConditionsFromColumn Method
      CloseEditForm Method
     [Expand]CopyCellsToClipboard Method
      CopySelectedCellsToClipboard Method
     [Expand]ExportToCsv Method
     [Expand]ExportToXls Method
     [Collapse]ExportToXlsx Method
       ExportToXlsx(String) Method
       ExportToXlsx(Stream) Method
       ExportToXlsx(String, XlsxExportOptions) Method
       ExportToXlsx(Stream, XlsxExportOptions) Method
      FixItem Method
      FixRow Method
      GetFixedRowPosition Method
      GetFixedRowPositionByItem Method
      GetGroupFooterRowElementByRowHandle Method
      GetSelectedCells Method
      HideEditForm Method
      IsCellSelected Method
     [Expand]MovePrevRow Method
      SelectCell Method
      SelectCells Method
      ShouldSerializeColumnChooserBandsSortOrderComparer Method
      ShouldSerializeFixedLeftVisibleColumns Method
      ShouldSerializeFixedNoneVisibleColumns Method
      ShouldSerializeFixedRightVisibleColumns Method
      ShowConditionalFormattingManager Method
      ShowDialogEditForm Method
      ShowEditForm Method
      ShowFormatConditionDialog Method
      ShowGroupFooterSummaryEditor Method
      ShowInlineEditForm Method
     [Expand]StartAnimation Method
     [Expand]StopAnimation Method
      UnselectCell Method
      UnselectCells Method
   [Expand]TableViewCommands Class
   [Expand]TableViewHitInfo Class
    TableViewHitTest Enumeration
    TableViewSelectMode Enumeration
   [Expand]TabViewDetailDescriptor Class
   [Expand]TopBottomRuleFormatCondition Class
    TreeDerivationMode Enumeration
   [Expand]TreeListBandMenuInfo Class
   [Expand]TreeListColumn Class
   [Expand]TreeListColumnCollection Class
   [Expand]TreeListControl Class
   [Expand]TreeListControlBand Class
   [Expand]TreeListControlBandsLayout Class
    TreeListFilterMode Enumeration
    TreeListLineStyle Enumeration
   [Expand]TreeListNode Class
   [Expand]TreeListNodeCollection Class
   [Expand]TreeListNodeIterator Class
   [Expand]TreeListNodeSummaryItemCollection Class
   [Expand]TreeListSortInfoCollection Class
   [Expand]TreeListSummaryItem Class
   [Expand]TreeListSummaryItemCollection Class
   [Expand]TreeListView Class
   [Expand]TreeListViewCommands Class
   [Expand]UnboundExpressionEditorEventArgs Class
    UnboundExpressionEditorEventHandler Delegate
   [Expand]UniqueDuplicateRuleFormatCondition Class
    UseCardLightweightTemplates Enumeration
    UseLightweightTemplates Enumeration
    WaitIndicatorType Enumeration
  [Expand]DevExpress.Xpf.Grid.ConditionalFormatting
  [Expand]DevExpress.Xpf.Grid.LookUp
  [Expand]DevExpress.Xpf.Grid.TreeList
  [Expand]DevExpress.Xpf.Layout.Core
  [Expand]DevExpress.Xpf.LayoutControl
  [Expand]DevExpress.Xpf.Map
  [Expand]DevExpress.Xpf.NavBar
  [Expand]DevExpress.Xpf.Navigation
  [Expand]DevExpress.Xpf.PdfViewer
  [Expand]DevExpress.Xpf.PivotGrid
  [Expand]DevExpress.Xpf.PivotGrid.Printing
  [Expand]DevExpress.Xpf.Printing
  [Expand]DevExpress.Xpf.Printing.Parameters
  [Expand]DevExpress.Xpf.Printing.Parameters.Models
  [Expand]DevExpress.Xpf.Printing.PreviewControl.Bars
  [Expand]DevExpress.Xpf.Prism
  [Expand]DevExpress.Xpf.PropertyGrid
  [Expand]DevExpress.Xpf.Reports.UserDesigner
  [Expand]DevExpress.Xpf.Reports.UserDesigner.Extensions
  [Expand]DevExpress.Xpf.Reports.UserDesigner.Localization
  [Expand]DevExpress.Xpf.Reports.UserDesigner.ReportWizard
  [Expand]DevExpress.Xpf.Reports.UserDesigner.ReportWizard.Pages
  [Expand]DevExpress.Xpf.Ribbon
  [Expand]DevExpress.Xpf.RichEdit
  [Expand]DevExpress.Xpf.Scheduler
  [Expand]DevExpress.Xpf.Scheduler.Drawing
  [Expand]DevExpress.Xpf.Scheduler.Menu
  [Expand]DevExpress.Xpf.Scheduler.Reporting
  [Expand]DevExpress.Xpf.Scheduler.UI
  [Expand]DevExpress.Xpf.SpellChecker
  [Expand]DevExpress.Xpf.Spreadsheet
  [Expand]DevExpress.Xpf.Spreadsheet.Menu
  [Expand]DevExpress.Xpf.TreeMap
  [Expand]DevExpress.Xpf.Utils.Themes
  [Expand]DevExpress.Xpf.WindowsUI
  [Expand]DevExpress.Xpf.WindowsUI.Navigation
  [Expand]DevExpress.XtraRichEdit
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

TableView.ExportToXlsx(Stream) Method

Exports a grid to the specified stream in XLSX format.

Namespace:DevExpress.Xpf.Grid
Assembly:DevExpress.Xpf.Grid.v17.1.dll

Expanded Syntax

Parameters

stream
Type: Stream
A System.IO.Stream object to which the created XLSX file should be sent.

Expanded Remarks

To display the Print Preview of the grid, use the DataViewBase.ShowPrintPreview and DataViewBase.ShowPrintPreviewDialog methods. To print the grid, use the DataViewBase.Print or DataViewBase.PrintDirect method.

To learn more, see Printing.

Note

The grid can be previewed, printed and exported only if the DXPrinting Library is available. You should manually add the reference to the DevExpress.Xpf.Printing.v17.1 assembly.

Expanded Example

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=E1669.

This example shows how to preview and print/export the grid content. The grid is printed and exported using the built-in capabilities.

Expanded See Also

How would you rate this topic?​​​​​​​