officefileapi-devexpress-dot-spreadsheet-dot-spreadsheetmailmergeoptions.md
Gets or sets a value indicating whether worksheet names in a merged document(s) should be generated based on the template worksheet’s name.
Namespace : DevExpress.Spreadsheet
Assembly : DevExpress.Spreadsheet.v25.2.Core.dll
NuGet Package : DevExpress.Spreadsheet.Core
bool UseTemplateSheetNames { get; set; }
Property UseTemplateSheetNames As Boolean
| Type | Description |
|---|---|
| Boolean |
true , to use the template worksheet’s name to name worksheets in the resulting document(s); otherwise, false.
|
You can access this nested property as listed below:
| Object Type | Path to UseTemplateSheetNames |
|---|---|
| IWorkbook |
.MailMergeOptions .UseTemplateSheetNames
| | Workbook |
.MailMergeOptions .UseTemplateSheetNames
|
The following table demonstrates how the UseTemplateSheetNames property works depending on the selected mail merge mode (it is assumed that the template worksheet’s name is set to TemplateSheet).
|
Mail Merge Mode
|
UseTemplateSheetNames = False
(Default)
|
UseTemplateSheetNames = True
| | --- | --- | --- | |
Multiple Documents
|
The resulting worksheet name for each workbook is Sheet1.
|
The resulting worksheet name for each workbook is TemplateSheet.
| |
Multiple Worksheets
|
The resulting worksheet names are Sheet1, Sheet2, …, SheetN.
|
The resulting worksheet names are TemplateSheet1, TemplateSheet2, …, TemplateSheetN.
| |
Single Worksheet
|
The resulting worksheet name is Sheet1.
|
The resulting worksheet name is TemplateSheet.
|
See Also
SpreadsheetMailMergeOptions Interface