API Reference

Class

ExcelColumnFormatRule

Namespace OfficeIMO.Excel
Assembly OfficeIMO.Excel
Modifiers sealed

Describes one header-based column number format.

Inheritance

  • Object
  • ExcelColumnFormatRule

Usage

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

Methods

public static ExcelColumnFormatRule FromFormat(String header, String numberFormat, Boolean includeHeader = false, Boolean autoFit = false) #
Returns: ExcelColumnFormatRule

Creates a custom number-format rule.

Parameters

header System.String requiredposition: 0
numberFormat System.String requiredposition: 1
includeHeader System.Boolean = false optionalposition: 2
autoFit System.Boolean = false optionalposition: 3
public static ExcelColumnFormatRule FromPreset(String header, ExcelNumberPreset preset, Int32 decimals = 2, CultureInfo culture = null, Boolean includeHeader = false, Boolean autoFit = false) #
Returns: ExcelColumnFormatRule

Creates a preset-based column format rule.

Parameters

header System.String requiredposition: 0
preset OfficeIMO.Excel.ExcelNumberPreset requiredposition: 1
decimals System.Int32 = 2 optionalposition: 2
culture System.Globalization.CultureInfo = null optionalposition: 3
includeHeader System.Boolean = false optionalposition: 4
autoFit System.Boolean = false optionalposition: 5
public String ResolveNumberFormat() #
Returns: String

Resolves the Excel number format code for this rule.

Properties

public String Header { get; } #

Header caption used to resolve the column.

public Nullable<ExcelNumberPreset> Preset { get; } #

Preset number format, when the rule was created from a preset.

public String NumberFormat { get; } #

Custom number format, when supplied directly.

public Int32 Decimals { get; } #

Decimal places used by preset formats that support precision.

public CultureInfo Culture { get; } #

Culture used for culture-aware preset formats such as currency.

public Boolean IncludeHeader { get; } #

Whether the header cell should also receive the format.

public Boolean AutoFit { get; } #

Whether the resolved column should be auto-fit after formatting.