Skip to main content

Excel file generation tool with pivot tables

Project description

Dumont

Excel file generation tool with data sheets and pivot tables.

Installation

pip install dumont

# Or install with xlwings support
pip install dumont[xlwings]

CLI Usage

Generate Excel with sample data

dumont generate -o sales_report.xlsx

Generate from CSV/Excel input

dumont generate -i data.csv -o report.xlsx

Customize pivot table

dumont generate -o report.xlsx \
    --pivot-values Revenue \
    --pivot-index Category \
    --pivot-columns Region \
    --aggfunc sum

Use xlwings engine (requires Excel installed)

dumont generate -o report.xlsx --engine xlwings

Preview sample data

dumont sample --rows 20

Preview Excel file contents

dumont preview report.xlsx --sheet Data --rows 10

Get file information

dumont info report.xlsx

Python API Usage

from dumont import create_excel_with_pivot, generate_sample_data
import pandas as pd

# Generate with sample data
create_excel_with_pivot(
    output_path="report.xlsx",
    use_sample_data=True,
    sample_rows=200,
)

# Use your own DataFrame
df = pd.read_csv("my_data.csv")
create_excel_with_pivot(
    output_path="report.xlsx",
    df=df,
    pivot_values="Sales",
    pivot_index="Product",
    pivot_columns="Quarter",
    pivot_aggfunc="sum",
)

# Use xlwings for native Excel features
from dumont import create_excel_with_xlwings

create_excel_with_xlwings(
    output_path="report.xlsx",
    use_sample_data=True,
    visible=True,  # Show Excel during creation
)

Output Structure

The generated Excel file contains:

  1. Data Sheet: Raw data with auto-fitted columns
  2. Pivot Sheet: Pivot table summarizing the data with margins/totals

Requirements

  • Python 3.8+
  • pandas
  • xlsxwriter
  • click
  • openpyxl
  • xlwings (optional, for advanced Excel features)

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

dumont-0.1.1.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dumont-0.1.1-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file dumont-0.1.1.tar.gz.

File metadata

  • Download URL: dumont-0.1.1.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for dumont-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f43b0dd6f653b4cb6dcec3b7c1f3ccef878e478f86d42c54c311c7497bd26b90
MD5 4b96d2b18fa07c9099b8c4608094393d
BLAKE2b-256 61ca38715bd2bfe99de79ff9990f3d648e3c8552d646f156dfb4f905ff80306b

See more details on using hashes here.

File details

Details for the file dumont-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: dumont-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for dumont-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a6a1d8ecb8c1fdbac93b27469fe2f6a85d3ae6776c6bee909b5359e1bb0f738e
MD5 f25e93bcc08f3a955c2f311bb51a753c
BLAKE2b-256 c5d92d2f389128711902861518579bd3a84bf1ef62d203915bef3bd9d86aaa20

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