Skip to main content

Simple wrapper for openpyxl to create tables

Project description

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-0.1.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

openpyxl_table-0.1.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: openpyxl_table-0.1.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.18

File hashes

Hashes for openpyxl_table-0.1.0.tar.gz
Algorithm Hash digest
SHA256 41e6888632c0949804506caf6dd04aecdb73e940c5aa2844843d3457e0e5af61
MD5 f72915c459f116fa99b6a53c325cc942
BLAKE2b-256 038d1ca83c6ad58ccc512275d8d7f591c0bb65585585fd0c0a83e7f375da8eac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openpyxl_table-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 df9c6510d26c38aecba8c257c6847b2fc3d23b5b783cc7937bb305b0f3dfb199
MD5 b285f8373e90ab14b10cf42c6f9327f0
BLAKE2b-256 88b024c6a5f8dde7c5b6f23fc4a7143fed0280907d5cb80e0ca5fa891de87b37

See more details on using hashes here.

Supported by

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