Skip to content

About

Finance formatting plugin for GridCraft: color coding, number format cycles, borders and more.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Format Tools for GridCraft

Finance-style formatting shortcuts for GridCraft, as a plugin. Everything stays on this computer: no accounts, no shared libraries, no network.

Commands

Command What it does
Color Code Hard-coded numbers blue, formulas black, links to other sheets green, links to other workbooks red. Text is left alone. Formulas with no references (=1000*12, =SUM(100,200)) count as hard-codes. A formula using a defined name that points at another sheet or workbook counts as a link.
Color Code Sheet Color Code for every used cell on the active sheet, without selecting first. GridCraft only shares the selection with a plugin, so when the used range isn't selected yet, the first press selects it and the second colors it (one undo step). Up to 100,000 cells; on a bigger sheet, select a block at a time and use Color Code.
Reset Colors Sets the selection's font color back to automatic.
Cycle Number Format Applies your first number format; run it again on the same cells for the next one.
Cycle Fill Color Same idea for fill colors (none, light yellow, light gray, light blue by default).
Cycle Font Color Same idea for font colors (black, blue, green, red, gray by default).
Cycle Border Bottom, thick bottom, totals (top + double bottom), outline, none.
Cycle Date / Percent / Multiple Format Separate cycles for dates (1/31/2026, Jan-26, ...), percents (0.0%, 0%, 0.00%) and multiples (0.0x, 0.00x, 0x).
Cycle Font Size 8, 9, 10, 11, 12, 14.
Cycle Alignment Left, center, right.
Apply Style Applies a named style from your settings in one undoable step. The ribbon has a button per default style: Input, Calculation, Total, Header, Percent, Multiple.
Cycle Style Steps through your styles on the same cells, like the other cycles.
Unhide All Unhides every row and column on the active sheet in one undoable step, including rows in collapsed groups. Rows hidden by the sheet's AutoFilter stay filtered (the filter is re-applied afterwards). Rows hidden by a filter inside an Excel table are revealed, as GridCraft can't re-apply table filters yet.
Unhide All Sheets Unhides every hidden and very hidden sheet, then goes back to the sheet you were on.
Settings Shows where the settings file is.

They sit on a Format Tools ribbon tab and in the cell right-click menu.

Settings

%APPDATA%\GridCraft\format-tools\settings.json, created on first use. Edit the color-coding colors and any cycle list (numberFormats, dateFormats, percentFormats, multipleFormats, fillColors, fontColors, borderPresets, fontSizes, alignments), or turn off constantFormulasAreInputs.

styles is a list of named formatting bundles. Every field but name is optional, and a style only changes what it names:

"styles": [
  {"name": "Input", "numberFormat": "#,##0_);(#,##0)", "fontColor": "#0000FF", "fill": "#FFFF99"},
  {"name": "Total", "bold": true, "border": "topDoubleBottom", "numberFormat": "#,##0_);(#,##0)"},
  {"name": "Header", "bold": true, "fill": "#DDEBF7", "align": "center"}
]

Fields: numberFormat, fontName, fontSize, fontColor (#RRGGBB or auto), bold, italic (true sets, false clears), fill (#RRGGBB or none), border (a GridCraft border preset such as bottom, topDoubleBottom, outside, none), align (left, center, right). Names match ignoring case. A file without styles (or with an empty list) gets the six defaults. The ribbon buttons ask for the default names, so if you rename or remove one, its button says the style is missing; Cycle Style always uses your list.

Known limits

GridCraft doesn't let plugins have keyboard shortcuts or Alt key tips yet, so commands run from the ribbon or the right-click menu.

Color Code Sheet takes two presses when the used range isn't selected, and there is no Color Code Workbook: GridCraft sends a plugin the selection's formulas only, never other sheets'. Defined names are followed for the first 10,000 names GridCraft shares. INDIRECT targets are text built at run time and are not followed (Macabacus doesn't either). Color coding refuses .xlsb files, which GridCraft opens as values only (every formula would look like an input). See docs/gridcraft-gaps.md.

Requirements

  • Nothing else: the plugin is one compiled program (format-tools.exe). Build it with cargo build --release.
  • A GridCraft build with the plugin host (storytold/gridcraft#1123) that also sends context.formulas to plugins. Without formulas, Color Code can't tell inputs from calculations and says so.

Install

From GitHub

In GridCraft, File › Options › Add-ins › Install from GitHub, paste https://github.com/Harrison-Booth/gridcraft-format-tools and confirm. GridCraft downloads the zip for your computer from the latest release and installs it into its plugins folder as com.harrisonbooth.format-tools. Agents and the CLI do the same with plugins.install {"url": "https://github.com/Harrison-Booth/gridcraft-format-tools"}.

  • A specific version: https://github.com/Harrison-Booth/gridcraft-format-tools/releases/tag/v0.5.0. Prereleases are only installable this way; "latest" skips them.
  • To update, install again. To uninstall, unload the plugin and delete its folder.

From a release zip, by hand

Each release has one zip per platform: format-tools-<version>-windows-x64.zip, -windows-arm64.zip, -macos-universal.zip, -linux-x64.zip, -linux-aarch64.zip. Unzip yours into a folder named com.harrisonbooth.format-tools inside GridCraft's plugins folder (%APPDATA%\GridCraft\plugins on Windows, ~/Library/Application Support/GridCraft/plugins on macOS, ~/.config/gridcraft/plugins on Linux) and restart GridCraft. Or unzip it anywhere and start GridCraft with --plugin <that folder>.

On macOS, a zip downloaded with a browser marks the program as quarantined and macOS refuses to start it, because it isn't signed. Clear the mark once: xattr -dr com.apple.quarantine "<plugins folder>/com.harrisonbooth.format-tools". Installing from GitHub inside GridCraft doesn't set the mark.

From source

  1. cargo build --release
  2. Copy plugin.json and target/release/format-tools.exe to %APPDATA%\GridCraft\plugins\format-tools, or copy the exe next to plugin.json here and start GridCraft with --plugin <this folder>.

Versioning

Format Tools uses semantic versioning: a patch release (0.7.1) fixes bugs, a minor release (0.8.0) adds or changes commands or settings, and a major release breaks the settings file or how commands behave. Before 1.0, a minor release may also carry breaking changes; the changelog says so when it does.

The version lives in three places that must match: version in plugin.json, version in Cargo.toml, and the git tag (v plus the version, e.g. v0.7.0). The release workflow checks this and fails if any differ. Every release has a section in CHANGELOG.md.

Releasing

  1. Move the changes under ## [Unreleased] in CHANGELOG.md into a new ## [X.Y.Z] - YYYY-MM-DD section.
  2. Bump version in both Cargo.toml and plugin.json, run cargo build so Cargo.lock follows, and commit.
  3. Tag and push: git tag vX.Y.Z && git push origin vX.Y.Z.
  4. .github/workflows/release.yml builds the five zips and attaches them to a GitHub release for the tag, with that version's CHANGELOG section as the release notes (GitHub's generated notes if the section is missing). Running the workflow by hand (Actions › Release › Run workflow) builds the zips as workflow artifacts without a release.

To test a zip locally before tagging, on Windows:

powershell -ExecutionPolicy Bypass -File tools\package.ps1

It builds for this computer (or -Target x86_64-pc-windows-msvc), checks the program answers GridCraft's initialize, and writes dist\format-tools-<version>-windows-<arch>.zip. Unzip it into a scratch folder named com.harrisonbooth.format-tools and run it through the CLI with gridcraft-cli --plugin <scratch folder> run ... (see CLAUDE.md, "Build & Test"). tools/package-unix.sh does the same for the macOS and Linux zips in CI.

License

License: MIT OR Apache-2.0, at your option. See LICENSE-MIT and LICENSE-APACHE.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

Finance formatting plugin for GridCraft: color coding, number format cycles, borders and more.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages