[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IDisplayFormat

IDisplayFormat Interface

Represents the display settings for an associated IRange.

Actions such as changing the conditional formatting or table style of a range can cause what is displayed in the current user interface to be inconsistent with the values in the corresponding properties of the IRange object. Use the properties of this interface to return the values as they are displayed in the current user interface.

Namespace: GrapeCity.Documents.Excel
Assembly: DS.Documents.Excel.dll
Syntax
public interface IDisplayFormat
Public Interface IDisplayFormat
Examples
IRange range = worksheet.Range["A1"];
range.Value = 1234.56;
range.NumberFormat = "$#,##0.00";
range.Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.Thin;
IFormatCondition condition = (IFormatCondition) range.FormatConditions.Add(
    FormatConditionType.CellValue, FormatConditionOperator.Greater, "1000", null);
condition.Interior.Color = Color.Yellow;
condition.NumberFormat = "0.00%";
condition.Borders[BordersIndex.EdgeBottom].LineStyle = BorderLineStyle.Thick;
IDisplayFormat displayFormat = range.DisplayFormat;
string numberFormat = displayFormat.NumberFormat;
IBorders borders = displayFormat.Borders;

Properties

Name Description
AddIndent

Gets a value that indicates whether the application automatically indents text of the associated IRange when the text alignment in a cell is set to equal distribution, either horizontally or vertically, as displayed in the current user interface.

This property reflects the displayed format of the associated range, which can differ from the underlying range settings.

Borders

Gets an IBorders object that represents the borders of the associated range object as displayed in the current user interface.

Font

Gets a IFont object that represents the font of the associated range as it is displayed in the current user interface.

FormulaHidden

Gets a value that indicates whether the formula of the associated IRange object is hidden when the worksheet is protected as displayed in the current user interface.

HorizontalAlignment

Gets a value that represents the horizontal alignment of the associated range object as displayed in the current user interface.

Use this property to retrieve the effective horizontal alignment shown in the user interface, which can differ from the corresponding IRange property when conditional formatting or table styles are applied.

IndentLevel

Gets a value that represents the indent level of the associated range object as displayed in the current user interface.

Use this property to retrieve the effective indent level shown for the range, which can differ from the range's own formatting properties when display-affecting features such as conditional formatting are applied.

Interior

Gets an IInterior object that represents the interior of the associated range object as displayed in the current user interface.

Locked

Gets a value that indicates whether the associated IRange is locked as displayed in the current user interface.

This property returns the displayed protection setting for the associated range.

MergeCells

Gets a value that indicates whether the associated IRange object contains merged cells as displayed in the current user interface.

NumberFormat

Gets a value that represents the format code of the associated range object as displayed in the current user interface.

Use this property to retrieve the effective number format currently shown for the range. This displayed format can differ from the range's own format settings when display-affecting features such as conditional formatting or table styles are applied.

Orientation

Gets a value that represents the text orientation of the associated IRange object as displayed in the current user interface.

ReadingOrder

Gets the reading order of the associated range object as it is displayed in the current user interface.

This value reflects the displayed format of the range and can differ from the corresponding IRange property when the displayed result is affected by formatting such as conditional formatting or table styles.

ShrinkToFit

Gets a value that indicates whether the application automatically shrinks text to fit as displayed in the current user interface.

This property reflects the displayed format of the associated range, which can differ from the underlying range settings.

Style

Gets the IStyle object associated with the range.

The returned style is the range's underlying style object. Display-only changes introduced by conditional formatting or table styles are not merged into this style object. To read values as they are currently displayed in the user interface, use other IDisplayFormat members such as NumberFormat, Font, or Borders.

VerticalAlignment

Gets a value that represents the vertical alignment of the associated range object as displayed in the current user interface.

Use this property to retrieve the effective vertical alignment shown for the range, which can differ from the corresponding range property when display settings are affected by features such as conditional formatting or table styles.

WrapText

Gets a value that indicates whether the application wraps the text of the associated range as displayed in the current user interface.

This property reflects the displayed format of the associated range, which can differ from the underlying IRange settings.