Skip to content
CAI
Software that uses CAICheck a score

westonganger/spreadsheet_architect

65.3

Adequate · 19 September 2026

893

lines of production code

Ruby

primary language

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

SpreadsheetArchitect is a Ruby library that generates spreadsheet files in CSV, ODS, and XLSX formats from ActiveRecord relations or plain data arrays. It provides a modular architecture for handling cell styling, type detection, and error management, while integrating with Rails to render these formats directly in HTTP responses. The system supports complex features such as hyperlinks, conditional formatting, and global configuration defaults for headers and styles.

How it got here

2016 — modular architecture and backend migration

5 changes.

The project underwent a major structural refactoring, transitioning from a monolithic codebase to a modular architecture with dedicated classes for CSV, ODS, and XLSX generation. This period also involved migrating the XLSX backend from the deprecated axlsx gem to caxlsx and updating the test infrastructure to a Rails engine dummy app.

2017–2022 — ODS support and test infrastructure

8 changes.

This period focused on extending the library to support ODS file formats by adding new utility modules for cell type detection and style conversion. Concurrently, a comprehensive testing infrastructure was established, including a Rails dummy application and extensive unit, model, and integration tests to validate CSV, XLSX, and ODS export functionality.

Features

Add CSV export and refactor ODS/XLSX generation methods

Introduces a new \to\_csv\ method for exporting data as CSV files. Refactors the existing \to\_ods\ and \to\_xlsx\ methods into \ClassMethods\, moving the core generation logic into dedicated files (\ods.rb\, \xlsx.rb\) and introducing helper modules for style conversion and type handling. This change improves code organization and adds support for specific features like hyperlinks in ODS/XLSX, conditional row styles, and better header handling.

_lib/spreadsheet\_architect/class\methods · high confidence

Add ODS support and refactor XLSX utility modules

This change introduces a new ODS (OpenDocument Spreadsheet) utility module to handle cell type detection and style conversion for ODS files, alongside a significant refactor of the XLSX utility module. The XLSX module now includes dedicated methods for converting styles to the axlsx format, validating cell ranges against spreadsheet dimensions, and supporting zero-based row indices. These utilities provide the foundational logic for generating and styling both XLSX and ODS files within the library.

_lib/spreadsheet\architect/utils · high confidence

Behavioural changes

Major refactoring of core library structure and default styling

The core library has been significantly restructured, moving from a single monolithic file to a modular architecture with separate classes for CSV, ODS, and XLSX generation. This change introduces a new global configuration system via \default\_options\ and \default\_options=\, allowing users to set project-wide defaults for headers and styles (such as font, color, and alignment) instead of passing them per-call. The default header style has also been updated to include specific font settings (Arial, size 10) and bolding is now false by default, altering the visual appearance of generated spreadsheets unless explicitly configured.

lib · high confidence

SpreadsheetArchitect v5.1.1: Improved error handling and controller renderer logic

This release updates SpreadsheetArchitect to version 5.1.1, introducing a dedicated exceptions module with specific error classes (such as OptionTypeError, InvalidRangeError, and NoDataError) to provide clearer, more descriptive error messages when invalid options or data are passed. The ActionController renderers have been refactored to handle CSV, ODS, and XLSX formats via a unified loop, adding logic to automatically derive the filename from an ActiveRecord Relation's class name if not explicitly provided. Additionally, the library now includes a new Utils module for core data processing and option verification, while removing an obsolete axlsx column width patch and cleaning up MIME type registration.

_lib/spreadsheet\architect · high confidence

Test coverage

Added Rails dummy application for testing; Added comprehensive model export tests; Added integration tests for spreadsheet endpoints; Added test fixtures for spreadsheet export scenarios; Added test infrastructure files for dummy app; Added unit tests for SpreadsheetArchitect core and utility modules; Added unit tests for XLSX and ODS spreadsheet generation; Migrate test suite to Rails engine dummy app.

Dependencies

Upgrade to caxlsx 4.0 and update development dependencies

The library has switched its XLSX generation backend from the deprecated axlsx gem to caxlsx (version 4.0 or higher), which also introduces a hard dependency on the csv gem for CSV export capabilities. Development tooling has been updated to include minitest-reporters and warning gems, while the required Ruby version is implicitly raised by the new caxlsx dependency. The Gemfile has been restructured to support testing against multiple Rails and database versions via environment variables.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 65.

Lenses

  • Code Health 78
  • Architecture 69
  • Maturity 61
  • Readiness 62
  • Security 99

Changes since last survey

  • 259 commits — 192 feature/other, 67 fixes

By area

  • (root) — 147 commits
  • lib/spreadsheet_architect — 57 commits
  • (repo) — 13 commits
  • test/unit — 13 commits
  • test/dummy_app — 9 commits
  • .github/workflows — 7 commits
  • test/rails_app — 4 commits
  • docs/axlsx_style_reference.md — 2 commits
  • lib/spreadsheet_architect.rb — 2 commits
  • test/models — 2 commits
  • examples/complex_xlsx_styling.rb — 1 commit
  • lib/generators — 1 commit
  • test/spreadsheet_architect — 1 commit

Notable commits

  • fix: Fix Axlsx Version Check
  • fix: Fix Bug where styles couldnt be set to false
  • fix: Fix CI badge
  • fix: Fix CI env variables
  • fix: Fix CI issues with logger and Rails 7.0 and below (#69)
  • fix: Fix Kitchen sink test links
  • fix: Fix ODS column types support and fix headers: false
  • fix: Fix bug when using column_style with include_header & letter based column naming
  • fix: Fix bug with XLSX :borders option
  • fix: Fix bug with caxlsx@2.0.2
  • fix: Fix bug with headers: false
  • fix: Fix downloads badge
  • fix: Fix freeze tests filenames
  • fix: Fix header check for when there are no headers
  • fix: Fix headers: false
  • fix: Fix missing quotes in code example in README (#10)
  • fix: Fix test suite for Rails 6
  • fix: Fix tests
  • fix: Fix tests
  • fix: Fix unused variable warning
  • …and 239 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

westonganger/spreadsheet_architect was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 19 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 658702d4db294a174d04f6472f7795fad6dc7efb — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-b51f968c9b10.