You are reading the documentation of sheetsmith 1.0.x.See the latest version (1.0.x)
Configuration properties
All properties use the prefix sheetsmith. They are bound to the immutable record SheetsmithProperties and come with metadata for IDE auto-completion.
| Property | Type | Default | Meaning | Constraint |
|---|---|---|---|---|
sheetsmith.formats.date |
String | yyyy-mm-dd |
Default Excel format of date cells, such as LocalDate values. |
not blank |
sheetsmith.formats.date-time |
String | yyyy-mm-dd hh:mm:ss |
Default Excel format of date-time cells, such as LocalDateTime values. |
not blank |
sheetsmith.formats.number |
String | empty (Excel “General”) | Default Excel format of numeric cells, integers included. | may be empty |
sheetsmith.preset |
TablePreset |
NONE |
Preset of sheet classes that declare preset = INHERIT: NONE, LIGHT, MEDIUM, DARK. |
not INHERIT |
sheetsmith.accent-color |
String | #4472C4 |
Accent colour of sheet classes that declare none: #RRGGBB or an IndexedColors name. |
valid colour |
sheetsmith.document.author |
String | sheetsmith |
Author recorded in every file. Empty leaves it out. | none |
sheetsmith.document.application |
String | sheetsmith |
Application recorded in every file. Empty leaves it out. | none |
sheetsmith.validation.packages |
list of String | empty | Packages scanned at startup, subpackages included. Empty disables the startup validation. | none |
Notes:
- Excel syntax. Formats use the Excel format syntax (section 6.6), not
DateTimeFormattersyntax:mmis the month, or the minutes after an hour code. - YAML and
#. In YAML, quote every value that starts with#, otherwise it is read as a comment:accent-color: "#1F4E79",number: "#,##0.00". - Invalid values stop the application at startup:
sheetsmith.preset=INHERIT, a blank date or date-time format, an invalid accent colour (IllegalArgumentExceptionfromSheetsmithDefaults), or a value that is not a preset name (Spring binding error). - Relaxed binding. Standard Spring Boot relaxed binding applies: enum values can be written in lower case (
light), and environment variables use the usual form (SHEETSMITH_PRESET,SHEETSMITH_ACCENT_COLOR,SHEETSMITH_FORMATS_DATE_TIME,SHEETSMITH_DOCUMENT_AUTHOR,SHEETSMITH_VALIDATION_PACKAGES=com.example.export,com.example.reports).
application.yml:
sheetsmith: formats: date: dd/mm/yyyy date-time: dd/mm/yyyy hh:mm number: "#,##0.00" preset: LIGHT accent-color: "#1F4E79" document: author: Example Ltd application: Billing validation: packages: - com.example.export - com.example.reportsapplication.properties:
sheetsmith.formats.date=dd/mm/yyyysheetsmith.formats.date-time=dd/mm/yyyy hh:mmsheetsmith.formats.number=#,##0.00sheetsmith.preset=LIGHTsheetsmith.accent-color=#1F4E79sheetsmith.document.author=Example Ltdsheetsmith.document.application=Billingsheetsmith.validation.packages=com.example.export,com.example.reportsIn .properties files # starts a comment only at the beginning of a line, so values containing # need no quoting.