Aspose::Cells::Cell::GetDisplayStyle method

Cell::GetDisplayStyle() method

Gets the display style of this cell.

Style Aspose::Cells::Cell::GetDisplayStyle()

ReturnValue

display style of this cell

Remarks

Same with using BorderType.SideBorders for GetDisplayStyle(BorderType). That is, this method will check and adjust top/bottom/left/right borders of this cell according to the style(GetStyle()) of its adjacent cells, but do not check the merged cells, and do not check the display style of adjacent cells.

See Also

Cell::GetDisplayStyle(bool) method

Gets the display style of this cell.

Style Aspose::Cells::Cell::GetDisplayStyle(bool includeMergedBorders)
ParameterTypeDescription
includeMergedBordersboolIndicates whether checking borders of merged cells.

ReturnValue

display style of this cell

Remarks

If the specified flag is false, then it is same with GetDisplayStyle(). Otherwise it is same with using BorderType.SideBorders|BorderType.DynamicStyleBorders for GetDisplayStyle(BorderType).

See Also

Cell::GetDisplayStyle(BorderType) method

Gets the display style of this cell.

Style Aspose::Cells::Cell::GetDisplayStyle(BorderType adjacentBorders)
ParameterTypeDescription
adjacentBordersBorderTypeIndicates which borders need to be checked and adjusted according to the borders of adjacent cells.

ReturnValue

display style of this cell

Remarks

If this cell is also affected by other settings such as conditional formatting, list objects, etc., then the display style may be different from GetStyle().

For flags of adjusting borders according to adjacent cells, BorderType.TopBorder/BorderType.BottomBorderBorderType.LeftBorder/BorderType.RightBorder denote whether check and combine the bottom/top/right/left borders of the left/right/top/bottom cells adjacent to this one.

For performance and compatibility consideration, some enums are used to denote some special operations: BorderType.Horizontal/BorderType.Vertical denote whether check and combine the bottom/right border of merged cells to this one. BorderType.Diagonal(that is, both StyleModifyFlag.DiagonalUpBorder and StyleModifyFlag.DiagonalDownBorder have been set) denotes check and combine borders from the display style of adjacent cells.

Please note, checking borders/styles of adjacent cells, especially the display styles, is time-consumed process. If there is no need to get the borders for the returned style, using BorderType.None to disable the process of adjacent cells will give better performance. When getting borders of adjacent cells from styles defined on those cells only(without setting BorderType.Diagonal), the performance also may be better because checking the display style of one cell is time-consumed too.

See Also