Skip to main content
Row

IWorkbook.GenerateMailMergeDocuments() Method

Performs the mail merge and returns the collection of resulting workbooks.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v23.2.Core.dll

NuGet Package: DevExpress.Spreadsheet.Core

Declaration

IList<IWorkbook> GenerateMailMergeDocuments()

Returns

Type Description
IList<IWorkbook>

An IList object that contains workbooks generated after the mail merge is preformed.

Remarks

The manner of generating the mail merge result depends on the used mail merge mode.

Mail Merge Mode Mail Merge Result
Multiple Documents Each data record is merged into a separate workbook. So, the mail merge results in as many workbooks as there are records in the specified data member (IWorkbook.MailMergeDataMember) of the bound data source (IWorkbook.MailMergeDataSource).
Multiple Worksheets Each data record is merged into a separate worksheet in a single workbook. So, the mail merge results in a single workbook.
Single Worksheet All data records are inserted one after the other into a single worksheet. So, the mail merge results in a single workbook.

When performing the mail merge, you can sort, group and filter data to appear in resulting documents.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GenerateMailMergeDocuments() 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.

See Also