# ExcelClearOptions

Selects which cell parts are cleared by ExcelRange.Clear.

Enum 

`OfficeIMO.Excel`

**Namespace**

`OfficeIMO.Excel`

**Assembly**

`OfficeIMO.Excel`

**Source revision**

`273d35d5ba8a` with working tree changes

**Source**

[ExcelCalculationOptions.cs:189](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelCalculationOptions.cs#L189)

**Base**

`Enum`

**Implements**

`IComparable` `ISpanFormattable` `IFormattable` `IConvertible`

**Modifiers**

sealed

**Attributes**

`Flags`

Selects which cell parts are cleared by [ExcelRange.Clear](/api/excel/officeimo-excel-excelrange/).

## Inheritance

- Enum
- ExcelClearOptions

## Usage

Explore 13 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.

### Returned or exposed by 11

- Field [ExcelClearOptions.All](/api/excel/officeimo-excel-excelclearoptions/#field-all)
- Field [ExcelClearOptions.Comments](/api/excel/officeimo-excel-excelclearoptions/#field-comments)
- Field [ExcelClearOptions.ConditionalFormatting](/api/excel/officeimo-excel-excelclearoptions/#field-conditionalformatting)
- Field [ExcelClearOptions.DataValidations](/api/excel/officeimo-excel-excelclearoptions/#field-datavalidations)
- Field [ExcelClearOptions.Formulas](/api/excel/officeimo-excel-excelclearoptions/#field-formulas)
- Field [ExcelClearOptions.Hyperlinks](/api/excel/officeimo-excel-excelclearoptions/#field-hyperlinks)
- Field [ExcelClearOptions.Merges](/api/excel/officeimo-excel-excelclearoptions/#field-merges)
- Field [ExcelClearOptions.None](/api/excel/officeimo-excel-excelclearoptions/#field-none)
- Field [ExcelClearOptions.Sparklines](/api/excel/officeimo-excel-excelclearoptions/#field-sparklines)
- Field [ExcelClearOptions.Styles](/api/excel/officeimo-excel-excelclearoptions/#field-styles)
- Field [ExcelClearOptions.Values](/api/excel/officeimo-excel-excelclearoptions/#field-values)

### Accepted by parameters 2

- Method [ExcelCell.Clear](/api/excel/officeimo-excel-excelcell/#method-clear-officeimo-excel-excelclearoptions) parameter `options`
- Method [ExcelRange.Clear](/api/excel/officeimo-excel-excelrange/#method-clear-officeimo-excel-excelclearoptions) parameter `options`

Filter members 

Show inherited

## Inherited Methods

`public int CompareTo(object? target)` [#](#method-compareto-object)

Inherited from Enum

Parameters

**target object? required**

Returns

`int`

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

Inherited from Enum

Parameters

**obj object? required**

Returns

`bool`

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

Inherited from Enum

Returns

`int`

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

Inherited from object

Returns

`Type`

`public TypeCode GetTypeCode()` [#](#method-gettypecode)

Inherited from Enum

Returns

`TypeCode`

`public bool HasFlag(Enum flag)` [#](#method-hasflag-enum)

Inherited from Enum

Parameters

**flag Enum required**

Returns

`bool`

ToString 4 overloads

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

Inherited from Enum

Returns

`string`

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

Inherited from Enum

Parameters

**format string? required**

Returns

`string`

`public string ToString(IFormatProvider? provider)` [#](#method-tostring-iformatprovider)

Inherited from Enum

`Obsolete("The provider argument is not used. Use ToString() instead.")`

Parameters

**provider IFormatProvider? required**

Returns

`string`

`public string ToString(string? format, IFormatProvider? provider)` [#](#method-tostring-string-iformatprovider)

Inherited from Enum

`Obsolete("The provider argument is not used. Use ToString(String) instead.")`

Parameters

**format string? required**

**provider IFormatProvider? required**

Returns

`string`

## Values

`public const ExcelClearOptions None` [#](#field-none)

[ExcelCalculationOptions.cs:191](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelCalculationOptions.cs#L191)

Do not clear any cell data or metadata.

Value: `0`

`public const ExcelClearOptions Values` [#](#field-values)

[ExcelCalculationOptions.cs:193](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelCalculationOptions.cs#L193)

Clear literal cell values.

Value: `1`

`public const ExcelClearOptions Formulas` [#](#field-formulas)

[ExcelCalculationOptions.cs:195](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelCalculationOptions.cs#L195)

Clear cell formulas.

Value: `2`

`public const ExcelClearOptions Styles` [#](#field-styles)

[ExcelCalculationOptions.cs:197](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelCalculationOptions.cs#L197)

Clear cell style indexes.

Value: `4`

`public const ExcelClearOptions Comments` [#](#field-comments)

[ExcelCalculationOptions.cs:199](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelCalculationOptions.cs#L199)

Clear comments in the selected cells when supported.

Value: `8`

`public const ExcelClearOptions Hyperlinks` [#](#field-hyperlinks)

[ExcelCalculationOptions.cs:201](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelCalculationOptions.cs#L201)

Clear hyperlinks that overlap the range.

Value: `16`

`public const ExcelClearOptions DataValidations` [#](#field-datavalidations)

[ExcelCalculationOptions.cs:203](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelCalculationOptions.cs#L203)

Clear data validation rules that overlap the range.

Value: `32`

`public const ExcelClearOptions ConditionalFormatting` [#](#field-conditionalformatting)

[ExcelCalculationOptions.cs:205](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelCalculationOptions.cs#L205)

Clear conditional formatting rules that overlap the range.

Value: `64`

`public const ExcelClearOptions Merges` [#](#field-merges)

[ExcelCalculationOptions.cs:207](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelCalculationOptions.cs#L207)

Clear merged-cell definitions that overlap the range.

Value: `128`

`public const ExcelClearOptions Sparklines` [#](#field-sparklines)

[ExcelCalculationOptions.cs:209](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelCalculationOptions.cs#L209)

Clear sparklines whose target cells overlap the range.

Value: `256`

`public const ExcelClearOptions All` [#](#field-all)

[ExcelCalculationOptions.cs:211](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelCalculationOptions.cs#L211)

Clear all supported cell data and range metadata.

Value: `511`

<!-- PowerForge markdown artifact sha256:C88C8DE2843D1EB38D8117B1E998682B46C4BF2E6E084BB42F2D04B992AF7DE6 -->
