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

Uploaded Python 3

File details

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

File metadata

  • Download URL: openpyxl_table-1.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 f4b7fffa862dbe55940c0ea47fde62ab54304eaad08fdfbb30a4742b179ca747
MD5 21cf115c9e5018e9f640e8904ff2a739
BLAKE2b-256 fe7da18b49c8f0c091de4583a7fadb5b20b4530e6fea71d7d8e490bb14b9432b

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openpyxl_table-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for openpyxl_table-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0a34808c7b5a0fc6c52de14ffba4fd8cf457bd14e8cd9fbb96d80e03eb52e3c9
MD5 9f387d5cff254d3e79360fc1fafdf865
BLAKE2b-256 eca7f1756f432d65d0694fd6262b58a87823fc8c84ef1a1fce984269f4461fe1

See more details on using hashes here.

Provenance

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