Skip to main content

Table wrapper for openpyxl

Project description

OpenPyxl Table

from openpyxl_table import DictWriter
from openpyxl import Workbook
wb = Workbook()



if isinstance(ws := wb.active, Worksheet):
    with DictWriter(ws, "A1", ['first_name', 'middle', 'last_name'], auto_header=True) as writer:
        writer.writerow({'first_name': 'Baked', 'middle': 'lfds', 'last_name': 'Beans'})
        writer.writerow({'first_name': 'Lovely', 'middle': 'lfds','last_name': 'Spam'})
        writer.writerow({'first_name': 'Wonderful', 'middle': 'lfds','last_name': 'Spam'})


    with DictWriter(ws, "K1", ['first_name', 'middle', 'last_name'], auto_header=False, displayName="Table2") as writer:
        writer.writerow({'first_name': 'First', 'middle': 'Middle', 'last_name': 'Last'})
        writer.writerow({'first_name': 'Baked', 'middle': 'lfds', 'last_name': 'Beans'})
        writer.writerow({'first_name': 'Lovely', 'middle': 'lfds','last_name': 'Spam'})
        writer.writerow({'first_name': 'Wonderful', 'middle': 'lfds','last_name': 'Spam'})


wb.save("test.xlsx")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openpyxl_table-1.2.0.12.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openpyxl_table-1.2.0.12-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file openpyxl_table-1.2.0.12.tar.gz.

File metadata

  • Download URL: openpyxl_table-1.2.0.12.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for openpyxl_table-1.2.0.12.tar.gz
Algorithm Hash digest
SHA256 d0fc635a53e204079e8def0330eda1235dfd3f28e005f526f33ba75a84325fc9
MD5 bf602fd96d02030d92c8f2fc2cd41e14
BLAKE2b-256 e8c17cf290a84ed7c8012f421c0cae46ce044c9d72f98c8692198fb008fffe37

See more details on using hashes here.

Provenance

The following attestation bundles were made for openpyxl_table-1.2.0.12.tar.gz:

Publisher: pypi.yml on KalleDK/py-openpyxl-table

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openpyxl_table-1.2.0.12-py3-none-any.whl.

File metadata

File hashes

Hashes for openpyxl_table-1.2.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 8c1fb65dc758c10bc9269dc38fe48af77efcf0c216dbf976600da9bcf865f933
MD5 9280628f41a0a5a87c3b982e74b596b2
BLAKE2b-256 531f07e0b86502e7fb495f6ab46b9080f448cfd2cd8ac70dccc94c92405d7faa

See more details on using hashes here.

Provenance

The following attestation bundles were made for openpyxl_table-1.2.0.12-py3-none-any.whl:

Publisher: pypi.yml on KalleDK/py-openpyxl-table

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page