# ExcelRangeCompareOptions

Options controlling worksheet/range value comparisons.

Class 

`OfficeIMO.Excel`

**Namespace**

`OfficeIMO.Excel`

**Assembly**

`OfficeIMO.Excel`

**Source revision**

`273d35d5ba8a` with working tree changes

**Source**

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

**Modifiers**

sealed

Options controlling worksheet/range value comparisons.

## Inheritance

- object
- ExcelRangeCompareOptions

## Usage

Explore 2 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 2

- Method [ExcelDocument.CompareRanges](/api/excel/officeimo-excel-exceldocument/#method-compareranges-officeimo-excel-excelsheet-string-officeimo-excel-excelsheet-string-officeimo-excel-excelrangecompareoptions) parameter `options`
- Method [ExcelDocument.CompareWorksheets](/api/excel/officeimo-excel-exceldocument/#method-compareworksheets-officeimo-excel-excelsheet-officeimo-excel-excelsheet-officeimo-excel-excelrangecompareoptions) parameter `options`

Filter members 

Show inherited

## Constructors

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

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

## 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 bool TreatNullAndEmptyStringAsEqual { get; set; }` [#](#property-treatnullandemptystringasequal)

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

Treats null values and empty strings as equal. Enabled by default to match common reporting expectations.

`public bool TrimStrings { get; set; }` [#](#property-trimstrings)

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

Trims string values before comparing.

`public bool IgnoreCase { get; set; }` [#](#property-ignorecase)

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

Compares string values using ordinal case-insensitive comparison.

<!-- PowerForge markdown artifact sha256:39D51C9FC42FF7BB49FE65479984010EB4B436972A83570A85EC534ED9105146 -->
