corelibraries-devexpress-dot-printing-dot-exporthelpers-dot-iexportcontext-dot-mergecells-x28-devexpress-dot-export-dot-xl-dot-xlcellrange-x29.md
Merges cells in the specified range.
Namespace : DevExpress.Printing.ExportHelpers
Assembly : DevExpress.Printing.v25.2.Core.dll
NuGet Package : DevExpress.Printing.Core
void MergeCells(
XlCellRange range
)
Sub MergeCells(
range As XlCellRange
)
| Name | Type | Description |
|---|---|---|
| range | XlCellRange |
An XlCellRange object that specifies a cell range.
|
The following code snippets (auto-collected from DevExpress Examples) contain references to the MergeCells(XlCellRange) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
winforms-grid-customize-data-aware-export-output/CS/GridDataAwareExportCustomization/Form1.cs#L63
if(e.DataSourceRowIndex < 0) {
e.ExportContext.MergeCells(new XlCellRange(new XlCellPosition(0, e.DocumentRow - 1), new XlCellPosition(5, e.DocumentRow - 1)));
}
wpf-data-grid-add-page-headers-and-footers-to-exported-data/CS/GridPrint/Window1.xaml.cs#L60
e.ExportContext.AddRow(new[] { row });
e.ExportContext.MergeCells(new DevExpress.Export.Xl.XlCellRange(new DevExpress.Export.Xl.XlCellPosition(0, 0), new DevExpress.Export.Xl.XlCellPosition(2, 0)));
}
winforms-grid-customize-data-aware-export-output/VB/GridDataAwareExportCustomization/Form1.vb#L66
If e.DataSourceRowIndex < 0 Then
e.ExportContext.MergeCells(New XlCellRange(New XlCellPosition(0, e.DocumentRow - 1), New XlCellPosition(5, e.DocumentRow - 1)))
End If
wpf-data-grid-add-page-headers-and-footers-to-exported-data/VB/GridPrint/Window1.xaml.vb#L63
e.ExportContext.AddRow({row})
e.ExportContext.MergeCells(New Xl.XlCellRange(New Xl.XlCellPosition(0, 0), New Xl.XlCellPosition(2, 0)))
End Sub
See Also