Export data to xlsx
Project description
Exdata
Exdata is a Python package for exporting data to Excel (xlsx) files with a focus on flexibility, customization, and ease of use. It provides a rich set of features for creating complex Excel documents with precise control over layout and formatting. Built on top of xlsxwriter, it leverages its robust Excel file generation capabilities while providing a more intuitive and flexible interface for complex document structures.
Features
- Flexible Data Structure: Create complex layouts using nested rows and columns
- Rich Text Formatting: Support for formatted text with different styles within a single cell
- Customizable Layout: Control cell sizes, positions, and expansion behavior
- Memory Efficient: Support for both in-memory and file-based operations
Installation
pip install exdata
Quick Start
from exdata import XlsxExporter, Sheet, Row, Cell, Column
formats = {
'default': {
'border': 1,
'align': 'vcenter',
},
'header': {
'border': 1,
'align': 'center',
'valign': 'vcenter',
'bg_color': '#98D0FF',
'bold': True,
},
}
sheet = Sheet(
name='Example',
data=[
Row(
data=[
Column([
Cell('User'),
Row([
Cell('First name'),
Cell('Last name'),
]),
]),
Cell('Age'),
Column([
Cell('Contact Details'),
Row([
Cell('Email'),
Cell('Phone'),
]),
]),
],
format='header',
),
Row(data=[
Cell('John'),
Cell('Doe'),
Cell(30),
Cell('john.doe@example.com'),
Cell('+1 234-567-8901'),
]),
Row(data=[
Cell('Jane'),
Cell('Smith'),
Cell(28),
Cell('jane.smith@example.com'),
Cell('+1 234-567-8902'),
]),
Row(data=[
Cell('Bob'),
Cell('Johnson'),
Cell(35),
Cell('bob.johnson@example.com'),
Cell('+1 234-567-8903'),
]),
],
format='default',
)
exporter = XlsxExporter(sheets=[sheet], formats=formats)
with open('data_grid_example.xlsx', 'wb') as f:
f.write(exporter.export().read())
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 exdata-0.1.2.tar.gz.
File metadata
- Download URL: exdata-0.1.2.tar.gz
- Upload date:
- Size: 213.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cbdabe3347e744ba3011fc26664c5d639c8e2e37941cdb690752d32e1dfcdd8
|
|
| MD5 |
0cf6fb7ba712e709bce8085778ba8552
|
|
| BLAKE2b-256 |
1af3837ed973dff08f42b5fa5618c73234495032d1d371abb26b87051cc7375e
|
Provenance
The following attestation bundles were made for exdata-0.1.2.tar.gz:
Publisher:
release.yml on kindlycat/exdata
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
exdata-0.1.2.tar.gz -
Subject digest:
6cbdabe3347e744ba3011fc26664c5d639c8e2e37941cdb690752d32e1dfcdd8 - Sigstore transparency entry: 828840105
- Sigstore integration time:
-
Permalink:
kindlycat/exdata@58e85b0484f932a593360244aae918e14efded77 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/kindlycat
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@58e85b0484f932a593360244aae918e14efded77 -
Trigger Event:
push
-
Statement type:
File details
Details for the file exdata-0.1.2-py3-none-any.whl.
File metadata
- Download URL: exdata-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe4371bcd6faf7fe9ffca95342f00ca60a2e289ab5ac744b03f5d21d0c425612
|
|
| MD5 |
3ec96b842c07257364b31bf11ef3c049
|
|
| BLAKE2b-256 |
f3a01c7150ce4466ca29b56d4ac4bda8e6d570327ccda3b6d450d345cc2455c6
|
Provenance
The following attestation bundles were made for exdata-0.1.2-py3-none-any.whl:
Publisher:
release.yml on kindlycat/exdata
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
exdata-0.1.2-py3-none-any.whl -
Subject digest:
fe4371bcd6faf7fe9ffca95342f00ca60a2e289ab5ac744b03f5d21d0c425612 - Sigstore transparency entry: 828840108
- Sigstore integration time:
-
Permalink:
kindlycat/exdata@58e85b0484f932a593360244aae918e14efded77 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/kindlycat
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@58e85b0484f932a593360244aae918e14efded77 -
Trigger Event:
push
-
Statement type: