ExcelDocumentFluent
OfficeIMO.Excel
The fluent methods of ExcelDocument, 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
- ExcelDocumentFluent
Methods
public static TSelf ActiveWorksheet<TSelf>(TSelf excelDocument, string sheetName) #Sets the worksheet that spreadsheet applications should show when the workbook opens.
Type Parameters
- TSelf
Parameters
- excelDocument TSelf
- The instance.
- sheetName string
- Worksheet name.
Returns
TSelf The same instance.public static TSelf ActiveWorksheet<TSelf>(TSelf excelDocument, int sheetIndex) #Sets the worksheet that spreadsheet applications should show when the workbook opens.
Type Parameters
- TSelf
Parameters
- excelDocument TSelf
- The instance.
- sheetIndex int
- Zero-based worksheet index.
Returns
TSelf The same instance.public static TSelf ActiveWorksheet<TSelf>(TSelf excelDocument, ExcelSheet sheet) #Sets the worksheet that spreadsheet applications should show when the workbook opens.
Type Parameters
- TSelf
Parameters
- excelDocument TSelf
- The instance.
- sheet OfficeIMO.Excel.ExcelSheet
- Worksheet to activate.
Returns
TSelf The same instance.public static TSelf ActiveWorksheet<TSelf>(TSelf excelDocument, Action<ExcelSheet> configure) #Configures ExcelDocument.ActiveWorksheet in place: Gets the worksheet that spreadsheet applications show when the workbook opens, or null when the active tab is not a worksheet.
Type Parameters
- TSelf
Parameters
- excelDocument TSelf
- The instance.
- configure System.Action<OfficeIMO.Excel.ExcelSheet>
- Configures the value.
Returns
TSelf The same instance.public static TSelf ApplicationProperties<TSelf>(TSelf excelDocument, Action<ExcelApplicationProperties> configure) #Configures ExcelDocument.ApplicationProperties in place: Extended (application) properties (Company, Manager, etc.).
Type Parameters
- TSelf
Parameters
- excelDocument TSelf
- The instance.
- configure System.Action<OfficeIMO.Excel.ExcelApplicationProperties>
- Configures the value.
Returns
TSelf The same instance.public static TSelf Calculation<TSelf>(TSelf excelDocument, Action<ExcelCalculationOptions> configure) #Configures ExcelDocument.Calculation in place: Formula calculation and cached-result policy used during save.
Type Parameters
- TSelf
Parameters
- excelDocument TSelf
- The instance.
- configure System.Action<OfficeIMO.Excel.ExcelCalculationOptions>
- Configures the value.
Returns
TSelf The same instance.public static TSelf Configure<TSelf>(TSelf excelDocument, Action<TSelf> configure) #Assigns callbacks and related configuration without invoking delegate-valued properties.
Type Parameters
- TSelf
Parameters
- excelDocument TSelf
- The instance.
- configure System.Action<TSelf>
- Assignments applied in order.
Returns
TSelf The same instance.Examples
// C# initializer or property // C# fluent
new global::OfficeIMO.Excel.ExcelDocument { DateTimeOffsetWriteStrategy = value }; excelDocument.Configure(configured => configured.DateTimeOffsetWriteStrategy = value);public static TSelf CustomProperties<TSelf>(TSelf excelDocument, Action<ExcelCustomDocumentPropertyCollection> configure) #Configures ExcelDocument.CustomProperties in place: Custom workbook properties keyed by property name.
Type Parameters
- TSelf
Parameters
- excelDocument TSelf
- The instance.
- configure System.Action<OfficeIMO.Excel.ExcelCustomDocumentPropertyCollection>
- Configures the value.
Returns
TSelf The same instance.public static TSelf DateSystem<TSelf>(TSelf excelDocument, ExcelDateSystem value) #Sets ExcelDocument.DateSystem: Gets or sets the workbook date system used for serialized date values.
Type Parameters
- TSelf
Parameters
- excelDocument TSelf
- The instance.
- value OfficeIMO.Excel.ExcelDateSystem
- The value.
Returns
TSelf The same instance.Examples
// C# initializer or property // C# fluent
new global::OfficeIMO.Excel.ExcelDocument { DateSystem = value }; excelDocument.DateSystem(value);public static TSelf DateTimeOffsetWriteMode<TSelf>(TSelf excelDocument, ExcelDateTimeOffsetWriteMode value) #Sets ExcelDocument.DateTimeOffsetWriteMode: Controls how DateTimeOffset values are written to worksheet cells. Defaults to ExcelDateTimeOffsetWriteMode.Text, which writes ISO 8601 text and keeps the offset. ExcelDateTimeOffsetWriteMode.Serial writes date serials converted by ExcelDocument.DateTimeOffsetWriteStrategy.
Type Parameters
- TSelf
Parameters
- excelDocument TSelf
- The instance.
- value OfficeIMO.Excel.ExcelDateTimeOffsetWriteMode
- The value.
Returns
TSelf The same instance.Examples
// C# initializer or property // C# fluent
new global::OfficeIMO.Excel.ExcelDocument { DateTimeOffsetWriteMode = value }; excelDocument.DateTimeOffsetWriteMode(value);public static TSelf DefaultChartStylePreset<TSelf>(TSelf excelDocument, ExcelChartStylePreset? value) #Sets ExcelDocument.DefaultChartStylePreset: Optional default chart style preset applied to charts created in this workbook.
Type Parameters
- TSelf
Parameters
- excelDocument TSelf
- The instance.
- value OfficeIMO.Excel.ExcelChartStylePreset?
- The value.
Returns
TSelf The same instance.Examples
// C# initializer or property // C# fluent
new global::OfficeIMO.Excel.ExcelDocument { DefaultChartStylePreset = value }; excelDocument.DefaultChartStylePreset(value);public static TSelf Execution<TSelf>(TSelf excelDocument, Action<ExcelExecutionPolicy> configure) #Configures ExcelDocument.Execution in place: Execution policy for controlling parallel vs sequential operations.
Type Parameters
- TSelf
Parameters
- excelDocument TSelf
- The instance.
- configure System.Action<OfficeIMO.Excel.ExcelExecutionPolicy>
- Configures the value.
Returns
TSelf The same instance.public static TSelf Properties<TSelf>(TSelf excelDocument, Action<ExcelBuiltinDocumentProperties> configure) #Configures ExcelDocument.Properties in place: Built-in (core) document properties (Title, Creator, etc.).
Type Parameters
- TSelf
Parameters
- excelDocument TSelf
- The instance.
- configure System.Action<OfficeIMO.Excel.ExcelBuiltinDocumentProperties>
- Configures the value.
Returns
TSelf The same instance.public static TSelf SheetCachingEnabled<TSelf>(TSelf excelDocument, bool value = true) #Sets ExcelDocument.SheetCachingEnabled: Enables caching of ExcelSheet wrappers for faster repeat access at the cost of higher memory usage. Set to false to avoid holding references to every sheet in very large workbooks.
Type Parameters
- TSelf
Parameters
- excelDocument TSelf
- The instance.
- value bool = true
- The value; true when omitted.
Returns
TSelf The same instance.Examples
// C# initializer or property // C# fluent
new global::OfficeIMO.Excel.ExcelDocument { SheetCachingEnabled = value }; excelDocument.SheetCachingEnabled(value);public static TSelf TableNameComparer<TSelf>(TSelf excelDocument, IEqualityComparer<string> value) #Sets ExcelDocument.TableNameComparer: Controls how workbook-level table name uniqueness is compared. Defaults to StringComparer.OrdinalIgnoreCase. Changing this will reset the internal cache and rebuild it on next use. Set it once before adding tables for predictable behavior.
Type Parameters
- TSelf
Parameters
- excelDocument TSelf
- The instance.
- value System.Collections.Generic.IEqualityComparer<string>
- The value.
Returns
TSelf The same instance.Examples
// C# initializer or property // C# fluent
new global::OfficeIMO.Excel.ExcelDocument { TableNameComparer = value }; excelDocument.TableNameComparer(value);public static TSelf VbaProject<TSelf>(TSelf excelDocument, OfficeVbaProject project, OfficeVbaWriteOptions? options = null) #Applies a native source project, preserving unrelated payloads and requiring explicit VBA signature removal.
Type Parameters
- TSelf
Parameters
- excelDocument TSelf
- The instance.
- project OfficeIMO.OfficeVbaProject
- The value.
- options OfficeIMO.OfficeVbaWriteOptions? = null
- The value.
Returns
TSelf The same instance.public static TSelf WorkbookThemeName<TSelf>(TSelf excelDocument, string name) #Sets the workbook theme name while preserving the rest of the theme XML.
Type Parameters
- TSelf
Parameters
- excelDocument TSelf
- The instance.
- name string
- The value.
Returns
TSelf The same instance.public static TSelf WorkbookThemeXml<TSelf>(TSelf excelDocument, string themeXml) #Replaces or creates the workbook theme part with caller-supplied DrawingML theme XML.
Type Parameters
- TSelf
Parameters
- excelDocument TSelf
- The instance.
- themeXml string
- The value.
Returns
TSelf The same instance.public static TSelf WriteReservation<TSelf>(TSelf excelDocument, ExcelWorkbookWriteReservationOptions? options = null) #Writes workbook write-reservation metadata. This is not package encryption and does not protect worksheet or workbook structure.
Type Parameters
- TSelf
Parameters
- excelDocument TSelf
- The instance.
- options OfficeIMO.Excel.ExcelWorkbookWriteReservationOptions? = null
- The value.
Returns
TSelf The same instance.