Skip to main content
pip install easy_excel, xlwt


###Example easy

import os
from easy_excel import Column, Sheet, Excel


class A:
def __init__(self, a='Nothing', b='Hello my friend', c=43):
self.a, self.b, self.c = a, b, c


excel_example = Excel()
columns = [
Column('a', lambda x: x.b, width=5000),
Column('b', lambda x: x.b, width=6000),
Column('Thi is C', lambda x: x.c)
]
sheet = Sheet('New sheet', columns=columns, objects=[A(), A(b='54'), A('Hi', 'example')])
excel_example.add_sheet(sheet)

base_dir = os.path.dirname(os.path.abspath(__file__))
excel_example.save(file_name='example1', dir=base_dir + '/excel/')

###Example inheritance
import os
from easy_excel import Column, Sheet, Excel


class CustomTemplateSheet(Sheet):
title = 'Example title sheet'
name = 'Example name sheet'
columns = [
Column('first', lambda x: x['first']),
Column('this is second', lambda x: x['second'], width=15000),
]

excel = Excel()
objects = [
{'first': "I'm first", 'second': 'Hi'},
{'first': '1', 'second': 2},
{'first': 'and me', 'second': 'and you'},
{'first': 'and me', 'second': 'and you'},
{'first': 'and me', 'second': 'and you'},
{'first': 'and me', 'second': 'and you'},
{'first': 'and me', 'second': 'and you'},
{'first': 'and me', 'second': 'and you'},
]
sheet1 = CustomTemplateSheet(objects=objects)
sheet2 = CustomTemplateSheet(
name='Im second sheet', title='Im for first object', object=objects[0]
)

excel.add_sheet(sheet1)
excel.add_sheet(sheet2)

base_dir = os.path.dirname(os.path.abspath(__file__))
excel.save(file_name='example2', dir=base_dir + '/excel/')

Metadata

Release files for easy_excel 0.0.7

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

Source distribution (sdist)

Source distribution for easy_excel 0.0.7
File Size Uploaded Provenance Actions
easy_excel-0.0.7.tar.gz 3.3 kB Without provenance Details for easy_excel-0.0.7.tar.gz

Release files / easy_excel-0.0.7.tar.gz

Download URL easy_excel-0.0.7.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
bdac8645229aaee23619010fd86376af1e991f843cd57c7cdcc063da6642bbff
BLAKE2b-256 checksum
How to use checksums
484189ad56f10327570bfe5556bf2f023bd7205a0333caf6ff6c5c7bee0c277d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for easy_excel 0.0.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.

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.

Release history Release notifications | RSS feed

This release

0.0.7 This release

1 release file No provenance

0.0.4

0.0.2

0.0.1

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