Skip to content
sheetsmith

What's new in 1.1.0

Version 1.1.0 adds three features to sheetsmith: built-in converters for more Java types, hyperlinks in cells and sheet templates. It also fixes how shared configuration errors are reported. Applications written for 1.0.0 need a few mechanical changes, listed with their fix in section 2.

Change In short Details
More built-in converters Sixteen more types are written without a converter: identifiers, resources, currencies, time zones, locales, months, years, optional numbers, java.sql dates and hyperlinks. section 1.1
Hyperlinks in cells A field of type Hyperlink becomes a clickable link, and any converter can produce a link. section 1.2
Sheet templates The configuration of a sheet is declared once in a template and reused by every sheet class. section 1.3
Fewer duplicated errors An error of a template or style sheet shared by several sheet classes is reported once. section 1.4
Layout options as Toggle freezeHeader, autoFilter and autoSizeColumns of @ExcelSheet are now Toggle, so that a template can set them. section 2.2

The following types are written directly, without declaring or registering a converter.

Type Cell written
UUID, URI, URL, File text
Currency text, the ISO 4217 code, such as EUR
ZoneId, ZoneOffset text, such as Europe/Rome or +02:00
Locale text, the language tag, such as it-IT
YearMonth text, such as 2026-10
Year number
AtomicBoolean Excel boolean
OptionalInt, OptionalLong, OptionalDouble number, or an empty cell when the value is absent
java.sql.Date, java.sql.Timestamp Excel date and date with time, in the default time zone of the JVM
Hyperlink clickable link (section 1.2)

Converters written by the application, on a field or registered for a type, keep winning over the built-in ones, so existing exports do not change. The complete list and the conversion rules are in section 11.2.

The new type Hyperlink, in the package cloud.baldilorenzo.sheetsmith.value, holds an address and an optional text to show. A field of this type becomes a clickable link, with the usual blue and underlined look of Excel.

@ExcelSheet(title = "Invoices Q3")
public record InvoiceLine(
@ExcelColumn(header = "Number", order = 10) String number,
@ExcelColumn(header = "Amount", order = 20, format = "#,##0.00") BigDecimal amount,
@ExcelColumn(header = "Document", order = 30) Hyperlink document) {
}
new InvoiceLine("2026/101", new BigDecimal("4200.00"),
Hyperlink.of("https://billing.example.com/invoices/2026-101", "Open invoice"));
  • The addresses allowed are http, https and mailto. They are checked when the Hyperlink is created, so an invalid address fails in the code that builds the data, not during the generation.
  • Without a text, the cell shows the address.
  • Any converter can produce a link with CellValue.link, the new form of CellValue. A domain type such as an order number can therefore become a link to the page of the order.
  • Excel accepts at most 65,530 links in a sheet: beyond that, the generation fails instead of producing a file that Excel would repair by removing every link.

Hyperlinks are described in section 11.5.

In 1.0.0, a style sheet shares named styles between sheet classes, but the rest of the configuration (preset, accent colour, title style, auto-filter, frame, and which style goes in which slot) is repeated on every sheet class. Version 1.1.0 adds the sheet template: a class annotated with @ExcelSheetTemplate that declares that configuration once. Sheet classes reference it with @ExcelSheet(template = ...).

The example below is an application that produces many reports, each with its own columns, all with the same corporate look.

The style sheet is the same in both versions:

@ExcelStyleSheet
@ExcelStyle(name = "corp-title", fontSize = 14, bold = Toggle.TRUE)
@ExcelStyle(name = "corp-header", bold = Toggle.TRUE, align = Align.CENTER)
@ExcelStyle(name = "corp-total", bold = Toggle.TRUE, borderTop = Border.DOUBLE)
public final class CorporateStyles {
private CorporateStyles() {
}
}

Before, with 1.0.0. Every sheet class repeats the whole configuration:

@ExcelSheet(
title = "Invoices Q3",
preset = TablePreset.MEDIUM,
accentColor = "#1F4E79",
styleSheets = CorporateStyles.class,
titleStyle = "corp-title",
autoFilter = true,
outerBorder = Border.MEDIUM,
header = @HeaderStyles(base = "corp-header"),
body = @BodyStyles(lastRow = "corp-total"))
public record InvoiceLine(
@ExcelColumn(header = "Number", order = 10) String number,
@ExcelColumn(header = "Issued", order = 20) LocalDate issued,
@ExcelColumn(header = "Amount", order = 30, format = "#,##0.00") BigDecimal amount) {
}
@ExcelSheet(
title = "Staff",
preset = TablePreset.MEDIUM,
accentColor = "#1F4E79",
styleSheets = CorporateStyles.class,
titleStyle = "corp-title",
autoFilter = true,
outerBorder = Border.MEDIUM,
header = @HeaderStyles(base = "corp-header"),
body = @BodyStyles(lastRow = "corp-total"))
public record EmployeeLine(
@ExcelColumn(header = "Name", order = 10) String name,
@ExcelColumn(header = "Hired", order = 20) LocalDate hired) {
}

After, with 1.1.0. The configuration is declared once, in the template:

@ExcelSheetTemplate(
preset = TablePreset.MEDIUM,
accentColor = "#1F4E79",
styleSheets = CorporateStyles.class,
titleStyle = "corp-title",
autoFilter = Toggle.TRUE,
outerBorder = Border.MEDIUM,
header = @HeaderStyles(base = "corp-header"),
body = @BodyStyles(lastRow = "corp-total"))
public final class CorporateReport {
private CorporateReport() {
}
}

and every sheet class declares only its title, its template and its columns:

@ExcelSheet(title = "Invoices Q3", template = CorporateReport.class)
public record InvoiceLine(
@ExcelColumn(header = "Number", order = 10) String number,
@ExcelColumn(header = "Issued", order = 20) LocalDate issued,
@ExcelColumn(header = "Amount", order = 30, format = "#,##0.00") BigDecimal amount) {
}
@ExcelSheet(title = "Staff", template = CorporateReport.class)
public record EmployeeLine(
@ExcelColumn(header = "Name", order = 10) String name,
@ExcelColumn(header = "Hired", order = 20) LocalDate hired) {
}

A sheet class can still set any attribute itself, apart from the preset, and what it sets wins over the template: a very large report can switch off automatic sizing, a report of another department can use its own accent colour.

What changes in the maintenance of many reports:

Task 1.0.0 1.1.0
Style configuration on each sheet class about ten lines one attribute, template
Changing the corporate colour, or adding a frame to every report every sheet class the template
A report that forgets the auto-filter, or mistypes a colour possible, and unnoticed not possible, unless the sheet class sets it on purpose
Sharing the look across applications through a library named styles only named styles and the whole sheet configuration

Templates are described in section 10. They come with five new validation rules, V-21 to V-25 (section 13.3).

When several sheet classes generated together referenced the same invalid style sheet, generate reported each error of the style sheet once per sheet class. Each error is now reported once, as the startup validation already did. The same holds for templates.

  • The Spring Boot integration is built against Spring Boot 4.1.2. Apache POI is unchanged, 5.5.1.
  • The library is built and tested on Java 17, 21 and 25.