# ExcelCreateOptionsFluent

The fluent methods of ExcelCreateOptions, generated from its public properties: A property-named method sets a property and a singular-named method adds…

Class 

`OfficeIMO.Excel`

**Namespace**

`OfficeIMO.Excel`

**Assembly**

`OfficeIMO.Excel`

**Modifiers**

static

The fluent methods of [ExcelCreateOptions](/api/excel/officeimo-excel-excelcreateoptions/), generated from its public properties: A property-named method sets a property and a singular-named method adds to a collection, both returning the same instance.

## Inheritance

- object
- ExcelCreateOptionsFluent

Filter members 

Show inherited

## Methods

`public static ExcelCreateOptions DocumentType(ExcelCreateOptions excelCreateOptions, ExcelDocumentType value)` [#](#method-documenttype-officeimo-excel-excelcreateoptions-officeimo-excel-exceldocumenttype)

Sets [ExcelCreateOptions.DocumentType](/api/excel/officeimo-excel-excelcreateoptions/): Controls the Open XML workbook type when no destination extension is available.

Parameters

**excelCreateOptions OfficeIMO.Excel.ExcelCreateOptions required**

The instance.

**value OfficeIMO.Excel.ExcelDocumentType required**

The value.

Returns

`ExcelCreateOptions` The same instance.

Examples

```csharp
// C# initializer or property                                               // C# fluent
new global::OfficeIMO.Excel.ExcelCreateOptions { DocumentType = value };    excelCreateOptions.DocumentType(value);
```

`public static ExcelCreateOptions FirstSheetName(ExcelCreateOptions excelCreateOptions, string? value)` [#](#method-firstsheetname-officeimo-excel-excelcreateoptions-string)

Sets [ExcelCreateOptions.FirstSheetName](/api/excel/officeimo-excel-excelcreateoptions/): Optional worksheet created when a new workbook has no sheets.

Parameters

**excelCreateOptions OfficeIMO.Excel.ExcelCreateOptions required**

The instance.

**value string? required**

The value.

Returns

`ExcelCreateOptions` The same instance.

Examples

```csharp
// C# initializer or property                                                 // C# fluent
new global::OfficeIMO.Excel.ExcelCreateOptions { FirstSheetName = value };    excelCreateOptions.FirstSheetName(value);
```

OpenSettings 2 overloads

`public static ExcelCreateOptions OpenSettings(ExcelCreateOptions excelCreateOptions, OfficeOpenXmlLoadSettings? value)` [#](#method-opensettings-officeimo-excel-excelcreateoptions-officeimo-officeopenxmlloadsettings)

Sets [ExcelCreateOptions.OpenSettings](/api/excel/officeimo-excel-excelcreateoptions/): Optional package settings applied when reading the template.

Parameters

**excelCreateOptions OfficeIMO.Excel.ExcelCreateOptions required**

The instance.

**value OfficeIMO.OfficeOpenXmlLoadSettings? required**

The value.

Returns

`ExcelCreateOptions` The same instance.

Examples

```csharp
// C# initializer or property                                               // C# fluent
new global::OfficeIMO.Excel.ExcelCreateOptions { OpenSettings = value };    excelCreateOptions.OpenSettings(value);
```

`public static ExcelCreateOptions OpenSettings(ExcelCreateOptions excelCreateOptions, Action<OfficeOpenXmlLoadSettings> configure)` [#](#method-opensettings-officeimo-excel-excelcreateoptions-action-officeimo-officeopenxmlloadsettings)

Configures [ExcelCreateOptions.OpenSettings](/api/excel/officeimo-excel-excelcreateoptions/) in place (creating it when not set): Optional package settings applied when reading the template.

Parameters

**excelCreateOptions OfficeIMO.Excel.ExcelCreateOptions required**

The instance.

**configure System.Action<OfficeIMO.OfficeOpenXmlLoadSettings> required**

Configures the value.

Returns

`ExcelCreateOptions` The same instance.

`public static ExcelCreateOptions Overwrite(ExcelCreateOptions excelCreateOptions, bool value = true)` [#](#method-overwrite-officeimo-excel-excelcreateoptions-boolean)

Sets [ExcelCreateOptions.Overwrite](/api/excel/officeimo-excel-excelcreateoptions/): Allows a template destination to replace an existing file. The default is true.

Parameters

**excelCreateOptions OfficeIMO.Excel.ExcelCreateOptions required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

`ExcelCreateOptions` The same instance.

Examples

```csharp
// C# initializer or property                                            // C# fluent
new global::OfficeIMO.Excel.ExcelCreateOptions { Overwrite = value };    excelCreateOptions.Overwrite(value);
```

`public static ExcelCreateOptions PersistenceMode(ExcelCreateOptions excelCreateOptions, DocumentPersistenceMode value)` [#](#method-persistencemode-officeimo-excel-excelcreateoptions-officeimo-documentpersistencemode)

Sets DocumentCreateOptions.PersistenceMode.

Parameters

**excelCreateOptions OfficeIMO.Excel.ExcelCreateOptions required**

The instance.

**value OfficeIMO.DocumentPersistenceMode required**

The value.

Returns

`ExcelCreateOptions` The same instance.

Examples

```csharp
// C# initializer or property                                                  // C# fluent
new global::OfficeIMO.Excel.ExcelCreateOptions { PersistenceMode = value };    excelCreateOptions.PersistenceMode(value);
```

`public static ExcelCreateOptions Template(ExcelCreateOptions excelCreateOptions, string? value)` [#](#method-template-officeimo-excel-excelcreateoptions-string)

Sets [ExcelCreateOptions.Template](/api/excel/officeimo-excel-excelcreateoptions/): Optional workbook template copied into the new document.

Parameters

**excelCreateOptions OfficeIMO.Excel.ExcelCreateOptions required**

The instance.

**value string? required**

The value.

Returns

`ExcelCreateOptions` The same instance.

Examples

```csharp
// C# initializer or property                                           // C# fluent
new global::OfficeIMO.Excel.ExcelCreateOptions { Template = value };    excelCreateOptions.Template(value);
```

`public static ExcelCreateOptions TemplateStream(ExcelCreateOptions excelCreateOptions, Stream? value)` [#](#method-templatestream-officeimo-excel-excelcreateoptions-io-stream)

Sets [ExcelCreateOptions.TemplateStream](/api/excel/officeimo-excel-excelcreateoptions/): Optional caller-owned template stream. It cannot be combined with Template.

Parameters

**excelCreateOptions OfficeIMO.Excel.ExcelCreateOptions required**

The instance.

**value System.IO.Stream? required**

The value.

Returns

`ExcelCreateOptions` The same instance.

Examples

```csharp
// C# initializer or property                                                 // C# fluent
new global::OfficeIMO.Excel.ExcelCreateOptions { TemplateStream = value };    excelCreateOptions.TemplateStream(value);
```

`public static ExcelCreateOptions Theme(ExcelCreateOptions excelCreateOptions, OfficeTheme? value)` [#](#method-theme-officeimo-excel-excelcreateoptions-officeimo-officetheme)

Sets [ExcelCreateOptions.Theme](/api/excel/officeimo-excel-excelcreateoptions/): Optional visual theme for a new workbook. Null retains the workbook or template defaults.

Parameters

**excelCreateOptions OfficeIMO.Excel.ExcelCreateOptions required**

The instance.

**value OfficeIMO.OfficeTheme? required**

The value.

Returns

`ExcelCreateOptions` The same instance.

Examples

```csharp
// C# initializer or property                                        // C# fluent
new global::OfficeIMO.Excel.ExcelCreateOptions { Theme = value };    excelCreateOptions.Theme(value);
```

## 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?`

<!-- PowerForge markdown artifact sha256:709692FA3B058B9A377990D4FAEE27D46B13D3A7EEADE98C924C3FEF930283F8 -->
