Class FormatSection
Class used for Format Section.
Inherited Members
Namespace: Syncfusion.XlsIO.FormatParser
Assembly: Syncfusion.XlsIO.Portable.dll
Syntax
public class FormatSection : CommonObject, IParentApplication, IDisposable
  Constructors
FormatSection(IApplication, Object, List<FormatTokenBase>)
Initializes a new instance of the FormatSection class based on array of tokens.
Declaration
public FormatSection(IApplication application, object parent, List<FormatTokenBase> arrTokens)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IApplication | application | Represents current application.  | 
      
| System.Object | parent | Represents parent object.  | 
      
| System.Collections.Generic.List<FormatTokenBase> | arrTokens | Array of section's tokens.  | 
      
Properties
Count
Gets the number of tokens in the section.
Declaration
public int Count { get; }
  Property Value
| Type | 
|---|
| System.Int32 | 
Culture
Gets the culture used for conversion. Read-only.
Declaration
public CultureInfo Culture { get; }
  Property Value
| Type | 
|---|
| System.Globalization.CultureInfo | 
DecimalNumber
Gets the number of digits after "." sign. Read-only.
Declaration
public int DecimalNumber { get; }
  Property Value
| Type | 
|---|
| System.Int32 | 
FormatType
Gets the section type.
Declaration
public ExcelFormatType FormatType { get; }
  Property Value
| Type | 
|---|
| ExcelFormatType | 
HasCondition
Gets a value indicating whether section contains condition. Read-only.
Declaration
public bool HasCondition { get; }
  Property Value
| Type | 
|---|
| System.Boolean | 
IsFraction
Gets a value indicating whether number format contains fraction sign. Read-only.
Declaration
public bool IsFraction { get; }
  Property Value
| Type | 
|---|
| System.Boolean | 
IsScientific
Gets a value indicating whether section contains E/E+ or E- signs in format string.
Declaration
public bool IsScientific { get; }
  Property Value
| Type | 
|---|
| System.Boolean | 
IsThousandSeparator
Gets a value indicating whether thousand separator is present in number format. Read-only.
Declaration
public bool IsThousandSeparator { get; }
  Property Value
| Type | 
|---|
| System.Boolean | 
Item[Int32]
Returns single token from the section. Read-only.
Declaration
public FormatTokenBase this[int index] { get; }
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | index | 
Property Value
| Type | 
|---|
| FormatTokenBase | 
Methods
ApplyFormat(Double)
Applies format to the value.
Declaration
public string ApplyFormat(double value)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Double | value | Value to apply format to.  | 
      
Returns
| Type | Description | 
|---|---|
| System.String | String representation of the value.  | 
      
ApplyFormat(Double, Boolean)
Applies format to the value.
Declaration
public string ApplyFormat(double value, bool bShowReservedSymbols)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Double | value | Value to apply format to.  | 
      
| System.Boolean | bShowReservedSymbols | Indicates whether to show reserved symbols.  | 
      
Returns
| Type | Description | 
|---|---|
| System.String | String representation of the value.  | 
      
ApplyFormat(String)
Applies format to the value.
Declaration
public string ApplyFormat(string value)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | value | Value to apply format to.  | 
      
Returns
| Type | Description | 
|---|---|
| System.String | String representation of the value.  | 
      
ApplyFormat(String, Boolean)
Applies format to the value.
Declaration
public string ApplyFormat(string value, bool bShowReservedSymbols)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | value | Value to apply format to.  | 
      
| System.Boolean | bShowReservedSymbols | Indicates whether to show reserved symbols.  | 
      
Returns
| Type | Description | 
|---|---|
| System.String | String representation of the value.  | 
      
CheckCondition(Double)
Checks whether value value meets the condition.
Declaration
public bool CheckCondition(double value)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Double | value | Value to check.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Boolean | True if value meets the condition; otherwise returns False.  | 
      
Clone(Object)
Creates a new object that is a copy of the current instance.
Declaration
public object Clone(object parent)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Object | parent | Represents parent object.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Object | A new object that is a copy of this instance.  | 
      
FindCorrespondingHourSection(Int32)
Searches for corresponding hour token.
Declaration
public HourToken FindCorrespondingHourSection(int index)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | index | Start index to search.  | 
      
Returns
| Type | Description | 
|---|---|
| HourToken | Corresponding hour token.  | 
      
PrepareFormat()
Prepares format if necessary.
Declaration
public void PrepareFormat()