Skip to main content

Cellmate

cellmate is a Python package for creating and managing styled Excel spreadsheets using OpenPyXL. It provides high-level abstractions such as Style, Column, Sheet, and Workbook to simplify Excel operations while allowing for extensive customization and formatting.

Features

  • Reusable Styles: Define and apply consistent styles across cells, columns, and sheets.
  • Column Management: Create structured and styled columns with titles and content.
  • Sheet Creation: Build sheets with multiple columns, complete with styles and formatting.
  • Workbook Handling: Manage multiple sheets within a single workbook and save them to Excel files.
  • Built-in Styles: Use predefined styles for common formats such as currency, percentage, and dates.

Getting Started

Installation

Ensure you have Python 3.8 or later installed on your system. After that, you can install cellmate via pip:

pip install cellmate

Example Usage

Here's an example of how to create a styled Excel workbook using Cellmate:

import cellmate as xl
from cellmate import styles

# Define columns with data and styles
columns = [
    xl.Column(
        title="Product",
        content=["Apples", "Bananas", "Cherries"],
        title_style=styles.TITLE1,
        content_style=styles.DEFAULT
    ),
    xl.Column(
        title="Sales",
        content=["100", "200", "150"],
        title_style=xl.TITLE1,
        content_style=xl.Style(name="currency", number_format="$ #,##0.00")
    ),
    xl.Column(
        title="Growth",
        content=["0.05", "0.10", "0.07"],
        title_style=styles.TITLE1,
        content_style=styles.PERCENTAGE
    )
]

# Create a sheet and a workbook
sheet = xl.Sheet(data=columns, sheet_name="Summary")
workbook = xl.Workbook(sheets=[sheet])

# Save the workbook
workbook.save("example.xlsx")

Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request on GitHub.

License

This project is licensed under the MIT License.

Metadata

Release files for cellmate 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cellmate 0.2.0
File Size Uploaded Provenance Actions
cellmate-0.2.0.tar.gz 8.1 kB Without provenance Details for cellmate-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cellmate 0.2.0
File Interpreter ABI Platform Actions
cellmate-0.2.0-py3-none-any.whl Python 3 none any Details for cellmate-0.2.0-py3-none-any.whl

Total release size: 16.7 kB

Release files / cellmate-0.2.0.tar.gz

Download URL cellmate-0.2.0.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a7eeae9904de720dad1ae9d87e54ee322658b22537847e068a5bd2bb9a17f3f3
BLAKE2b-256 checksum
How to use checksums
5732b2fe3bb278d26bda99b4aa61caa5a2fc258fb22e636f570375164f152a2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.5

Release files / cellmate-0.2.0-py3-none-any.whl

Download URL cellmate-0.2.0-py3-none-any.whl
Size 8.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cf7ab89a1526b17c6678f0b76251960a7cd1185939198c93150a050ca212a31b
BLAKE2b-256 checksum
How to use checksums
c0e965f3f967992f197cd40f6ab7ce9699b6d2bc0a0140fea8beeda3874a36dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.5

Security for cellmate 0.2.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page