Skip to main content

Apply color coding to Excel spreadsheet cells based on content type

Project description

color-spreadsheet

Apply color coding to Excel spreadsheet cells based on content type.

Overview

color-spreadsheet is a Python package that automatically color-codes cells in Excel spreadsheets based on their content type. This makes it easier to visually distinguish between hardcoded inputs, formulas, and cross-sheet references.

Installation

pip install color-spreadsheet

Usage

Command Line

color-spreadsheet --input="input.xlsx" --output="output.xlsx"

Full Options

color-spreadsheet --input="input.xlsx" --output="output.xlsx" --colorway="standard-financial"

List Available Colorways

color-spreadsheet --list-colorways

Python API

from color_spreadsheet import process_workbook
from color_spreadsheet.colorways.registry import get_colorway

# Get the colorway
colorway = get_colorway("standard-financial")

# Process the workbook
stats = process_workbook("input.xlsx", "output.xlsx", colorway)

# Print statistics
print(f"Processed {stats.total_cells_processed} cells")

Color Scheme

The default standard-financial colorway uses the following color scheme:

  • Blue (0000FF): Hardcoded values (numbers, dates, booleans) - These are your inputs
  • Black (000000): Formulas referencing cells in the same sheet
  • Green (008000): Formulas referencing cells in other sheets (cross-sheet references)
  • Unchanged: Text labels (left as default formatting)

This color scheme makes it easy to:

  • Identify which cells contain hardcoded data that may need updating
  • Trace formula dependencies within and across sheets
  • Distinguish between data inputs and calculated values

Extensibility

The package is designed with an extensible colorway architecture. Future versions will support additional colorways, and you can create custom colorways by extending the Colorway base class.

License

MIT License - see LICENSE file for details.

Author

Maxwell Shron (max@shron.net)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

color_spreadsheet-0.1.0.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

color_spreadsheet-0.1.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file color_spreadsheet-0.1.0.tar.gz.

File metadata

  • Download URL: color_spreadsheet-0.1.0.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.12

File hashes

Hashes for color_spreadsheet-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f2dce990a89953408105c0558724d471a2f1f49421e47e8bf76c8ff9e2dbcb3f
MD5 afe18b8a7a93b98d73f98d74630a9761
BLAKE2b-256 885affd6ccef45a3ac13c280b87ea6dfd7c70fc01e4805c027e35b1fa23802b0

See more details on using hashes here.

File details

Details for the file color_spreadsheet-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for color_spreadsheet-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c44c3fcb728b4ad1f93e9614ff652d84ada0cc7daafa00e87b644a0fdb65fff8
MD5 a8bd979ac22cf362283767fa269cd7b5
BLAKE2b-256 9061b64d7965a57f730b1b1e67676ad91fb9922f39afa9f951f709fa0a364198

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page