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

Uploaded Python 3

File details

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

File metadata

  • Download URL: openpyxl_table-1.2.0.9.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.9.tar.gz
Algorithm Hash digest
SHA256 a3e6301f862f4c7e26a62a5c08ec449ca2e10f147f574a8c3cdb843ecbb2c031
MD5 cdb5dbbea00af93d86d53f3f3d0903dd
BLAKE2b-256 846408ba69956b47ff229104c8ee590e18c21a7f06105569047d57fc6afa93cf

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openpyxl_table-1.2.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 edb46df070745bc5b133486044abb3b059972a3e709b9f8fc66f3671be430550
MD5 73eac1f8878cfc94dd3f35c8dbbfa8cb
BLAKE2b-256 f8cb6ebe837b6552db58634f99c0deae313ac7b46c79fc650a87f80fbc26a878

See more details on using hashes here.

Provenance

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