API Reference
Class
ExcelColumnFormatRule
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.
Returned or exposed by
- Property ExcelColumnFormatPlan.Rules
- Method ExcelColumnFormatRule.FromFormat
- Method ExcelColumnFormatRule.FromPreset
Methods
public static ExcelColumnFormatRule FromFormat(String header, String numberFormat, Boolean includeHeader = false, Boolean autoFit = false) #Returns:
ExcelColumnFormatRuleCreates a custom number-format rule.
Parameters
- header System.String
- numberFormat System.String
- includeHeader System.Boolean = false
- autoFit System.Boolean = false
public static ExcelColumnFormatRule FromPreset(String header, ExcelNumberPreset preset, Int32 decimals = 2, CultureInfo culture = null, Boolean includeHeader = false, Boolean autoFit = false) #Returns:
ExcelColumnFormatRuleCreates a preset-based column format rule.
Parameters
- header System.String
- preset OfficeIMO.Excel.ExcelNumberPreset
- decimals System.Int32 = 2
- culture System.Globalization.CultureInfo = null
- includeHeader System.Boolean = false
- autoFit System.Boolean = false
public String ResolveNumberFormat() #Returns:
StringResolves the Excel number format code for this rule.
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object
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.