Skip to main content

A Python package to ease writing tables of data to Excel

Project description

Status Documentation Status

Documentation here: https://xltable.readthedocs.org/en/latest

Example:

from xltable import *
import pandas as pa

# create a dataframe with three columns where the last is the sum of the first two
dataframe = pa.DataFrame({
        "col_1": [1, 2, 3],
        "col_2": [4, 5, 6],
        "col_3": Cell("col_1") + Cell("col_2"),
}, columns=["col_1", "col_2", "col_3"])

# create the named xlwriter Table instance
table = Table("table", dataframe)

# create the Workbook and Worksheet objects and add table to the sheet
sheet = Worksheet("Sheet1")
sheet.add_table(table)

workbook = Workbook("example.xlsx")
workbook.add_sheet(sheet)

# write the workbook to the file (requires xlsxwriter)
workbook.to_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

xltable-0.2.6.zip (21.3 kB view details)

Uploaded Source

File details

Details for the file xltable-0.2.6.zip.

File metadata

  • Download URL: xltable-0.2.6.zip
  • Upload date:
  • Size: 21.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for xltable-0.2.6.zip
Algorithm Hash digest
SHA256 29c043b66b3f0db0e3553c591778d5f9380bac67b7ce6f4a5a7a4861f17ba118
MD5 bb353d5d62165b29332c18f8d62368b8
BLAKE2b-256 493a65a37afde9ce8697a6b1329ca95469489a51ef98ec3ca86d1d250b57b1e6

See more details on using hashes here.

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