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), aided by Claude Code
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file color_spreadsheet-0.1.1.tar.gz.
File metadata
- Download URL: color_spreadsheet-0.1.1.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6448de16a82977cea15533c49b4f04ae862d447d33b3c92b5612c1a02336a197
|
|
| MD5 |
96983d9618365d616fc43d81fd76514e
|
|
| BLAKE2b-256 |
5ec7c86ba7206eedf96994fc571e87c01b3341c9baaf2c61228a09643b42aaf6
|
File details
Details for the file color_spreadsheet-0.1.1-py3-none-any.whl.
File metadata
- Download URL: color_spreadsheet-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c101d46ec0a02b15b6de1f2b186aa50217773e592598041a685d39d0632a4ddf
|
|
| MD5 |
e630b50eab682a2db0e80890213ecb20
|
|
| BLAKE2b-256 |
804ea07bb742bf37098a0d13fbb1baf48599faf267eb1b9cbd119c243b14a2be
|