Skip to main content

Template based Excel reporting with Python.

Project description

xlwings REPORTS is a commercial solution for template based Excel and PDF reporting. It allows business users without Python knowledge to create & maintain Excel templates without having to go back to a Python developer for every change: xlwings REPORTS separates the Python code (that gets and prepares all the data) from the Excel template (that defines which data goes where and how it should be formatted).

It is based on xlwings and Jinja and is therefore easy to extend.

Installation

pip install xlwings-reports

NOTE: xlwings REPORTS requires a license key. To get a free trial license key, see the docs

Excel template

Wherever you want to paste the values of your Python variables, just put a Jinja2 variable {{ myvar }} in that cell. This works equally well for strings, numbers, dicts, NumPy arrays, Pandas DataFrames, images or Matplotlib figures.

For example, create an Excel file called MyTemplate.xlsx where you put in {{ title }} in cell A1 and {{ df }} in cell A3.

Create the report

To produce the Excel report run the following script:

from xlwings_reports import create_report
import pandas as pd
df = pd.DataFrame(data=[[1,2],[3,4]])
wb = create_report('MyTemplate.xlsx', 'MyReport.xlsx', title='MyTitle', df=df)

xlwings REPORTS can dynamically shift rows by using Frames, for details see the docs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for xlwings-reports, version 1.5.1
Filename, size File type Python version Upload date Hashes
Filename, size xlwings_reports-1.5.1-cp27-none-any.whl (18.8 kB) File type Wheel Python version cp27 Upload date Hashes View hashes
Filename, size xlwings_reports-1.5.1-cp35-none-any.whl (18.9 kB) File type Wheel Python version cp35 Upload date Hashes View hashes
Filename, size xlwings_reports-1.5.1-cp36-none-any.whl (18.7 kB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size xlwings_reports-1.5.1-cp37-none-any.whl (18.7 kB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size xlwings_reports-1.5.1-cp38-none-any.whl (18.7 kB) File type Wheel Python version cp38 Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page