[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Expand]Grid View
  [Expand]Tree List
  [Expand]Card View
  [Expand]Reporting
  [Expand]Chart Control
  [Expand]Pivot Grid
  [Collapse]Spreadsheet
   [Expand]Product Information
    Getting Started
   [Collapse]Concepts
    [Expand]Spreadsheet Document
     Supported Formats
     Import and Export
    [Expand]Cell Basics
    [Expand]Spreadsheet Formulas
     Defined Names
     Data Validation
    [Expand]Data Presentation
    [Expand]Charting
     Printing
    [Collapse]Mail Merge
      Mail Merge Overview
      Template Document
      Mail Merge Functions
     Protection
     Adaptivity
     Keyboard Shortcuts
   [Expand]Visual Elements
  [Expand]Rich Text Editor
  [Expand]Scheduler
  [Expand]Site Navigation and Layout
  [Expand]HTML Editor
  [Expand]Gauges
  [Expand]Vertical Grid
  [Expand]Data Editors
  [Expand]Docking and Popups
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Controls
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Mail Merge Overview

The Mail Merge functionality enables you to automatically generate a set of documents based on a single template and include unique data values retrieved from a data source into each document. This feature can be useful for a variety of business requirements, such as personalizing letters, and composing catalogs and reports.

This document contains an overview of the mail merge process and lists special mail merge tools provided by ASPxSpreadsheet control.

Expanded Mail Merge Process

To perform a mail merge, you need a template and a data source.

  • A template is a document containing placeholders for the information that will be merged from a data source (mail merge fields). See the Mail Merge Functions topic to learn more about mail merge templates.
  • A data source contains data that will be merged into fields in a template to create merged documents. A data source can be any object that exposes the IList interface, such as a System.Collections.ArrayList or a System.Data.DataTable. So, you can create a mail merge data source at runtime, or retrieve data from an external database via corresponding data adapters.

    The data source is bound to the template via the IWorkbook.MailMergeDataSource and IWorkbook.MailMergeDataMember properties of the template workbook.

The IWorkbook.GenerateMailMergeDocuments method of the template workbook finalizes the mail merge process. It returns a collection of resulting workbooks (if the Single Sheet or Multiple Sheets mail merge mode is used, the collection will contain a single workbook). You can open the resulting workbook in an ASPxSpreadsheet control instance, or save it to a file or stream.

Expanded See Also

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