Skip to content
sheetsmith

Value domains

Mirrors Apache POI HorizontalAlignment.

Constant Meaning
INHERIT Not set: keeps the value of the lower cascade level (default).
GENERAL Excel default: text to the left, numbers and dates to the right.
LEFT Aligned to the left edge.
CENTER Centred horizontally.
RIGHT Aligned to the right edge.
FILL Content repeated to fill the width of the cell.
JUSTIFY Text wrapped and spaced so that each line reaches both edges.
CENTER_SELECTION Centred across adjacent cells with this alignment, without merging.
DISTRIBUTED Text wrapped, with the words of each line spread evenly.

Mirrors Apache POI VerticalAlignment.

Constant Meaning
INHERIT Not set (default).
TOP Aligned to the top edge.
CENTER Centred vertically.
BOTTOM Aligned to the bottom edge; the Excel default.
JUSTIFY Lines of wrapped text spaced to fill the height.
DISTRIBUTED Lines of wrapped text spread evenly across the height.

Mirrors Apache POI BorderStyle. Used by the border attributes of @ExcelStyle and by @ExcelSheet.outerBorder.

Constant Meaning
INHERIT Not set (default); on outerBorder, no frame.
NONE No line, removing a line set by a lower level.
THIN Thin solid line.
MEDIUM Medium weight solid line.
DASHED Thin dashed line.
DOTTED Thin dotted line.
THICK Thick solid line.
DOUBLE Double thin line.
HAIR Hairline, the thinnest line.
MEDIUM_DASHED Medium weight dashed line.
DASH_DOT Thin line of alternating dashes and dots.
MEDIUM_DASH_DOT Medium weight line of alternating dashes and dots.
DASH_DOT_DOT Thin line of dashes, each followed by two dots.
MEDIUM_DASH_DOT_DOT Medium weight line of dashes, each followed by two dots.
SLANTED_DASH_DOT Medium weight line of slanted dashes and dots.

Mirrors Apache POI FillPatternType. Patterns draw fillColor over fillBackgroundColor.

Constant Meaning
INHERIT Not set (default). With a fillColor, the fill is solid.
NO_FILL No fill, removing a fill set by a lower level.
SOLID_FOREGROUND Solid fill in the fill colour.
FINE_DOTS Dots covering half of the cell (“50% grey”).
ALT_BARS Dense dots covering three quarters (“75% grey”).
SPARSE_DOTS Sparse dots covering a quarter (“25% grey”).
THICK_HORZ_BANDS Thick horizontal stripes.
THICK_VERT_BANDS Thick vertical stripes.
THICK_BACKWARD_DIAG Thick diagonal stripes, top left to bottom right.
THICK_FORWARD_DIAG Thick diagonal stripes, bottom left to top right.
BIG_SPOTS Thick horizontal and vertical crosshatch.
BRICKS Thick diagonal crosshatch.
THIN_HORZ_BANDS Thin horizontal stripes.
THIN_VERT_BANDS Thin vertical stripes.
THIN_BACKWARD_DIAG Thin diagonal stripes, top left to bottom right.
THIN_FORWARD_DIAG Thin diagonal stripes, bottom left to top right.
SQUARES Thin horizontal and vertical crosshatch.
DIAMONDS Thin diagonal crosshatch.
LESS_DOTS Very sparse dots (“12.5% grey”).
LEAST_DOTS The sparsest dots (“6.25% grey”).

Mirrors Apache POI FontUnderline.

Constant Meaning
INHERIT Not set (default).
SINGLE Single line under the text.
DOUBLE Double line under the text.
SINGLE_ACCOUNTING Single accounting underline, lower and spanning the cell width.
DOUBLE_ACCOUNTING Double accounting underline, lower and spanning the cell width.
NONE No underline, removing one set by a lower level.

No direct POI enum; maps to the POI font type offsets.

Constant Meaning
INHERIT Not set (default).
NONE Normal text on the baseline, removing a superscript or subscript set by a lower level.
SUPER Superscript.
SUB Subscript.
Constant Meaning
INHERIT Not set: keeps the value of the lower level (default).
TRUE Enables the attribute.
FALSE Disables the attribute, overriding a lower level that enables it.
Constant Meaning
INHERIT Uses the application default preset. Valid on a sheet class only (default of @ExcelSheet.preset).
NONE No preset. Default of the application.
LIGHT Light table (section 7.2).
MEDIUM Medium table.
DARK Dark table.

The mirrored enums (Align, VerticalAlign, Border, Fill, Underline) contain INHERIT plus exactly one constant for each constant of the corresponding Apache POI enum, with identical names. A test of the library verifies the correspondence, so a future version of POI with new constants is detected when the library is built.

The names accepted as colours are the constants of org.apache.poi.ss.usermodel.IndexedColors in the version of Apache POI used by sheetsmith (5.5.1 for sheetsmith 1.0.0):

BLACK1, WHITE1, RED1, BRIGHT_GREEN1, BLUE1, YELLOW1, PINK1, TURQUOISE1, BLACK, WHITE, RED, BRIGHT_GREEN, BLUE, YELLOW, PINK, TURQUOISE, DARK_RED, GREEN, DARK_BLUE, DARK_YELLOW, VIOLET, TEAL, GREY_25_PERCENT, GREY_50_PERCENT, CORNFLOWER_BLUE, MAROON, LEMON_CHIFFON, LIGHT_TURQUOISE1, ORCHID, CORAL, ROYAL_BLUE, LIGHT_CORNFLOWER_BLUE, SKY_BLUE, LIGHT_TURQUOISE, LIGHT_GREEN, LIGHT_YELLOW, PALE_BLUE, ROSE, LAVENDER, TAN, LIGHT_BLUE, AQUA, LIME, GOLD, LIGHT_ORANGE, ORANGE, BLUE_GREY, GREY_40_PERCENT, DARK_TEAL, SEA_GREEN, DARK_GREEN, OLIVE_GREEN, BROWN, PLUM, INDIGO, GREY_80_PERCENT, AUTOMATIC.

Names are case-sensitive. Their actual rendering depends on the palette of the application that opens the file.

Attribute Range Unset
@ExcelStyle.rotation -90 to 90, or 255 ExcelStyle.UNSET
@ExcelStyle.indent 0 to 250 ExcelStyle.UNSET
@ExcelStyle.fontSize 1 to 409 ExcelStyle.UNSET
@ExcelColumn.width 1 to 255 ExcelStyle.UNSET
@ExcelColumn.order any int, unique per class none (mandatory)
Setting Default
Title none
Frozen header yes
Auto-filter no
Automatic column sizing yes
Outer frame none
Preset INHERIT on the class, NONE for the application
Accent colour application default, #4472C4
Date format yyyy-mm-dd
Date-time format yyyy-mm-dd hh:mm:ss
Number format Excel “General”
Document author and application sheetsmith
Startup validation disabled
Field converter factory public no-argument constructor (Spring: context beans or injection)