Document Solutions for Excel, Java Edition | Document Solutions
Features / Styles
In This Topic
    Styles
    In This Topic

    DsExcel Java provides users with the ability to customize the formatting of the cells in a worksheet.

    Styling a cell includes customizing the characteristics such as fonts, alignment, borders, fill (solid fill, gradient fill, pattern fill), named style and display format. Users can apply, create or remove custom cell styles based on their aesthetic preferences and specific requirements. This helps in ensuring enhanced clarity and increased readability.

    In order to apply style in a worksheet, refer to the following tasks.

    Some of the built-in styles in DsExcel Java are listed below:

    Category Description Methods

    Number Format

    Cell number format.

    IRange.setNumberFormat

    IRange.getNumberFormat

    Alignment

    Horizontal and vertical alignment of cell content, indentation,text wrap, text rotation and text shrinking.

    IRange.setAddIndent

    IRange.getAddIndent

    IRange.getIndentLevel

    IRange.setIndentLevel

    IRange.getWrapText

    IRange.setWrapText

    IRange.setShrinkToFit

    IRange.getShrinkToFit

    IRange.setMergeCells

    IRange.getMergeCells

    IRange.getReadingOrder

    IRange.setReadingOrder

    IRange.getOrientation

    IRange.setOrientation

    Font

    The font style of the text in the cells.

    IRange.getFont(IFont)

    Borders

    Cell border line styles and colors.

    IRange.getBorders(IBorders)

    Fill

    Cell pattern fill or gradient fill.

    IRange.getInterior(IInterior)

    Protection

    Cell protection options (Locked and Hidden)

    IRange.getLocked

    IRange.setLocked

    IRange.getFormulaHidden

    IRange.setFormulaHidden

    Besides the built-in styles, users can also create their own custom styles with description for individual cells or a range of cells in a worksheet by defining all the style attributes including font, font size, number format, alignment etc.