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.8.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.8-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: openpyxl_table-1.2.0.8.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.8.tar.gz
Algorithm Hash digest
SHA256 18cd164874ea855fab19704a8731ef1a5c0a543f31c756916da0ba08287792ff
MD5 a4a645d1bae304360794e51db45ac30a
BLAKE2b-256 7e84ed4bbcbea8defda83d0aa7a72bc40073e0ab26d191e27490a5d783b671e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for openpyxl_table-1.2.0.8.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.8-py3-none-any.whl.

File metadata

File hashes

Hashes for openpyxl_table-1.2.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 69dfc620cb8498d7ed11db374a0a24ba12550af58d88a33f43a7b90a784a21a0
MD5 b3bf1d301bfb844766cf9248ecaf0b81
BLAKE2b-256 c4cb395622bab063d79272ffd2179772aefefe45bcb1e343e900d289ac8c2bcd

See more details on using hashes here.

Provenance

The following attestation bundles were made for openpyxl_table-1.2.0.8-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