← Back to all sparks
A

aftables

INFRA · APIS
Velocity0.0

Create Spreadsheet Publications Following Best Practice

Accessible government spreadsheets in R, rebuilt on openxlsx2 and renamed along the way.

accessibilityspreadsheetsgovernment-statisticsopenxlsx2configuration
Current state
aftables generates spreadsheets that meet the UK Analysis Function's accessibility guidance, taking structured input and producing a formatted workbook with cover, contents, notes and table sheets. Version 2.0.0 replaced the workbook engine with openxlsx2 and added configuration through a config.yaml file, with create_config_yaml() exporting a template and generate_workbook() gaining arguments to point at it. The package was previously called a11ytables and was renamed in 1.0.2, with function names changed to match.
Where it's heading
The history reads in two phases. As a11ytables the work was about what belongs in an accessible spreadsheet, adding arbitrary pre-table metadata rows and enforcing rules such as rejecting tab titles that start with a numeral. Since the rename the work has been structural: a new backend, and configuration moved out of function arguments into a file that can be version-controlled and shared across a team. That second phase suits the audience, since government analysts producing recurring statistical releases want the same document properties applied every time rather than re-specified per run.
Prediction
Expect the config.yaml surface to grow to cover more of what is currently passed as arguments, given it arrived alongside alternative author, title and keywords arguments that it plainly supersedes. With the openxlsx2 migration complete, further releases are likely to be formatting fixes surfaced by real departmental publications, as 2.0.1 already was.

Recent moves

  1. 4mo ago

    rlang import restored for older R versions

    Adds an rlang import so the package keeps working on R below 4.4.0, a compatibility gap opened by the 2.0.0 rewrite. A one-line follow-up to a much larger release.

    View source ↗
  2. 5mo ago

    Workbook engine moved to openxlsx2; config.yaml introduced

    ⚡ SPARK

    Rebuilds the workbook back end on openxlsx2 and introduces file-based configuration for document properties and text formatting, alongside numeric formatting fixes that stop Excel warning about numbers stored as text. The rename in 1.0.2 gave the package a new identity; this release gives it a new foundation.

    View source ↗
  3. 1y ago

    Package renamed from a11ytables to aftables

    Renames the package and strips a11ytables references out of the function names, aligning it with the Analysis Function branding rather than the accessibility abbreviation. Breaking for every existing user, but an identity change rather than a capability one, and it precedes the structural work in 2.0.0.

    View source ↗
  4. 2y ago

    Tab titles beginning with a numeral now rejected

    Forces an error when a tab title starts with a numeral, encoding one more of the accessibility rules the package exists to enforce, plus a demo asset size reduction. Small, but consistent with the pre-rename pattern of turning guidance into validation.

    View source ↗
  5. 2y ago

    custom_rows allows arbitrary pre-table metadata

    Adds a custom_rows argument for arbitrary sentences above tables on contents, cover and notes sheets, with hyperlink support. Its insertion into the middle of the argument list is breaking for anyone who passed arguments positionally, a risk the notes acknowledge directly.

    View source ↗
  6. 2y ago

    Table count spelled out; README spelling corrected

    Small non-breaking changes: a README spelling correction and using words rather than numerals for a table count. Notable only for the era it belongs to, when this package was still a11ytables.

    View source ↗