# ExcelWorksheetMergeOptions

Options for merging worksheet data into another worksheet.

Class 

`OfficeIMO.Excel`

**Namespace**

`OfficeIMO.Excel`

**Assembly**

`OfficeIMO.Excel`

**Source revision**

`273d35d5ba8a` with working tree changes

**Source**

[ExcelWorksheetMergeOptions.cs:24](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelWorksheetMergeOptions.cs#L24)

**Modifiers**

sealed

Options for merging worksheet data into another worksheet.

## Inheritance

- object
- ExcelWorksheetMergeOptions

## Usage

Explore 1 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Accepted by parameters 1

- Method [ExcelDocument.MergeWorksheets](/api/excel/officeimo-excel-exceldocument/#method-mergeworksheets-officeimo-excel-excelsheet-officeimo-excel-excelsheet-officeimo-excel-excelworksheetmergeoptions) parameter `options`

Filter members 

Show inherited

## Constructors

`public ExcelWorksheetMergeOptions()` [#](#constructor-ctor)

[ExcelWorksheetMergeOptions.cs:24](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelWorksheetMergeOptions.cs#L24)

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public string? SourceRange { get; set; }` [#](#property-sourcerange)

[ExcelWorksheetMergeOptions.cs:9](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelWorksheetMergeOptions.cs#L9)

Source range to copy. When omitted, the source worksheet used range is copied.

`public int? TargetStartRow { get; set; }` [#](#property-targetstartrow)

[ExcelWorksheetMergeOptions.cs:14](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelWorksheetMergeOptions.cs#L14)

1-based target row. When omitted, rows are appended after the target worksheet used range.

`public int? TargetStartColumn { get; set; }` [#](#property-targetstartcolumn)

[ExcelWorksheetMergeOptions.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelWorksheetMergeOptions.cs#L19)

1-based target column. When omitted, the source range's starting column is used.

`public bool SourceHasHeader { get; set; }` [#](#property-sourcehasheader)

[ExcelWorksheetMergeOptions.cs:24](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelWorksheetMergeOptions.cs#L24)

Indicates that the first source row is a header row.

`public bool IncludeSourceHeader { get; set; }` [#](#property-includesourceheader)

[ExcelWorksheetMergeOptions.cs:29](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelWorksheetMergeOptions.cs#L29)

Copies the source header row. By default, headers are skipped when appending source rows.

`public bool MatchColumnsByHeader { get; set; }` [#](#property-matchcolumnsbyheader)

[ExcelWorksheetMergeOptions.cs:35](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelWorksheetMergeOptions.cs#L35)

Matches source columns to target columns by header text before copying values. Existing positional behavior is used when this is false.

`public int? TargetHeaderRow { get; set; }` [#](#property-targetheaderrow)

[ExcelWorksheetMergeOptions.cs:42](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelWorksheetMergeOptions.cs#L42)

1-based row containing target headers when [ExcelWorksheetMergeOptions.MatchColumnsByHeader](/api/excel/officeimo-excel-excelworksheetmergeoptions/) is true. When omitted, append operations use the first row of the target used range, and explicit target positions use the row immediately above [ExcelWorksheetMergeOptions.TargetStartRow](/api/excel/officeimo-excel-excelworksheetmergeoptions/).

`public int BlankRowsBefore { get; set; }` [#](#property-blankrowsbefore)

[ExcelWorksheetMergeOptions.cs:47](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelWorksheetMergeOptions.cs#L47)

Blank rows to leave before appended data when [ExcelWorksheetMergeOptions.TargetStartRow](/api/excel/officeimo-excel-excelworksheetmergeoptions/) is omitted.

`public bool OverwriteExistingCells { get; set; }` [#](#property-overwriteexistingcells)

[ExcelWorksheetMergeOptions.cs:53](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelWorksheetMergeOptions.cs#L53)

Allows merge/join operations to overwrite existing target cell contents. When false, merge/join operations throw if a non-empty source cell would replace an existing target cell.

<!-- PowerForge markdown artifact sha256:89A6C4873ECA38CCE4A3F1EFE39E2E2F7936FAF5A07764674B3C2DC68A6578B8 -->
