Excel Pixel Art
Convert images to Excel pixel art and back. Each cell becomes a pixel with its background colour matching the original image.
Installation
pip install excel-pixel-art
Or install from source:
git clone https://github.com/luigipascal/excelart.git
cd excelart
pip install -e .
Usage
Convert Image to Excel
image2xlsx photo.png
image2xlsx photo.png -o output.xlsx
image2xlsx photo.png --max-size 150
Options:
-o, --output: Output Excel file path (default:<input>_excel.xlsx)--max-size: Maximum dimension in cells (default: 100)
Convert Excel Back to Image
xlsx2image output.xlsx
xlsx2image output.xlsx -o recovered.png
xlsx2image output.xlsx --sheet Sheet1
Options:
-o, --output: Output image path (default:<input>_reconstructed.png)--sheet: Worksheet name to use (default: 'Image' if present, else active)--background R,G,B: Background colour for missing cells (default: 0,0,0)--no-autocrop: Disable auto-crop to solid-fill bounds
QA & Verification
# Compare with original for fidelity check
xlsx2image output.xlsx --compare original.png
# Generate visual diff heatmap
xlsx2image output.xlsx --compare original.png --diff-image diff.png
# CI pass/fail with threshold
xlsx2image output.xlsx --compare original.png --diff-threshold 5
Python API
from excel_pixel_art import image_to_excel, excel_to_image, compare_images
# Convert image to Excel
image_to_excel("photo.png", "output.xlsx", max_size=100)
# Convert back
excel_to_image("output.xlsx", "recovered.png")
# Compare for QA
compare_images("photo.png", "recovered.png", diff_output="diff.png", diff_threshold=5)
How It Works
-
Image → Excel: The image is resized to fit within
max_sizecells, maintaining aspect ratio. Each pixel becomes a cell with a solid fill colour matching the RGB value. -
Excel → Image: Cells with solid fills are read back, extracting their ARGB colour values. Auto-crop detects the actual pixel bounds, ignoring stray formatting.
-
QA Tools: The fidelity report compares reconstructed images against originals, with optional diff heatmaps and threshold-based pass/fail for CI integration.
Features
- ARGB colour handling - Proper Excel colour format (no transparency bugs)
- Fill caching - Fast generation even for images with thousands of unique colours
- Auto-crop - Ignores stray formatting outside the pixel grid
- Robust extraction - Handles both
fgColorandstart_colorpatterns - CI-friendly - Threshold-based pass/fail for automated testing
License
MIT
Metadata
Release files for excel-pixel-art 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| excel_pixel_art-1.0.0.tar.gz | 28.6 kB | With provenance | Details for excel_pixel_art-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| excel_pixel_art-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for excel_pixel_art-1.0.0-py3-none-any.whl |
Total release size: 37.9 kB
Release files / excel_pixel_art-1.0.0.tar.gz
| Download URL | excel_pixel_art-1.0.0.tar.gz |
|---|---|
| Size | 28.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c0ee16dfc8cd8f18f8073abd92cfa495de426c950ddd835ba8f6b572903d8c6c
|
|
BLAKE2b-256 checksum How to use checksums |
c2e7d8f0cf7ff1b6180d39f71d1c7061474d3fd969936c7bc3401e43234f9f04
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 30, 2025.
Transparency logRelease files / excel_pixel_art-1.0.0-py3-none-any.whl
| Download URL | excel_pixel_art-1.0.0-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9900461b96362c4896afe40f6316e44bcaf47fea0fb529e5e15512b38466b23d
|
|
BLAKE2b-256 checksum How to use checksums |
6b0a97c45c4ff789f83433b50b32cf42104f0ea52fc19ba9771549e92f365a47
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 30, 2025.
Transparency logSecurity for excel-pixel-art 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for excel_pixel_art-1.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 30, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.