GroupDocs.Assembly for Python via .NET

Insert Dynamic Charts into XLSX Files with Python API

GroupDocs.Assembly for Python via .NET offers a robust solution for automating XLSX documents with live data visualizations, making chart integration effortless.

Steps to Embed a Chart into a XLSX Document

GroupDocs.Assembly enables you to generate interactive charts within XLSX templates using live data. Choose from various chart types such as bar, pie, or line charts.

  1. Create a XLSX template with designated chart placeholders.
  2. Pull structured data from sources like JSON, XML, or databases.
  3. Define chart properties — including type, labels, colors, and styling.
  4. Render and save the completed document with charts inserted.
# Use this tag in your template to generate a chart dynamically
# Orders Prices by months<<y [Sum(c => c.Price)]>><<size [Count()]>>

import groupdocs.assembly as ga

    def run():

        # Set the path to your template file
        template = "chart_template.xlsx"

        # Connect to your desired data source
        data = ga.DataSourceInfo(GetChartData(), "orders")

        # Save the final document with the chart embedded
        asm = ga.DocumentAssembler()
        asm.assemble_document(template, "result.xlsx", data)
pip install groupdocs-assembly-net
click to copy
copied
More examples Documentation

Easily Add Dynamic Charts to Documents

GroupDocs.Assembly for Python via .NET lets you effortlessly embed live charts into documents created from templates. Seamlessly combine tables, charts, images, and more with rich formatting powered by real-time data.

Highlighted Features of GroupDocs.Assembly

Turn Raw Data into Informative Charts

With just a few lines of code, convert data from JSON, XML, CSV, and other formats into well-designed, professional charts using GroupDocs.Assembly.

Deliver Visually Engaging Reports

GroupDocs.Assembly supports a wide variety of chart types including bar, pie, and line charts. Mix these with other elements like tables, barcodes, and images to craft visually compelling documents.

Control Chart Layout and Style with Precision

Use LINQ syntax to define where and how charts appear. Customize visual properties such as colors, labels, and layout to align with your design requirements.

Generate Charts in Multiple File Formats

Create documents with embedded charts in popular formats like DOCX, XLSX, PPTX, PDF, HTML, and OpenOffice. GroupDocs.Assembly ensures full compatibility and layout fidelity.

How to Programmatically Insert Charts

This code example shows how to use GroupDocs.Assembly to dynamically generate charts and embed them into a XLSX file.

Python

# Set up a template containing chart placeholders
# Total Contract Price<<y [m.Total_Contract_Price]>>
# <<seriesColor [color]>>

import groupdocs.assembly as ga

    def run():

        # Define the path to your template file
        template = "table_template.xlsx"

        # Load the input data for the chart
        data_json = ga.data.JsonDataSource("Items.json")

        # Construct a data object with relevant fields
        data = ga.DataSourceInfo(data_json, "items")

        # Specify chart type, appearance, and other properties
        design = ga.DataSourceInfo("red", "color")

        # Initialize the DocumentAssembler component
        asm = ga.DocumentAssembler()

        # Save the document with the embedded chart
        asm.assemble_document(template, "result.xlsx", data, design)
pip install groupdocs-assembly-net
click to copy
copied
More examples Documentation

What is GroupDocs.Assembly for Python via .NET?

GroupDocs.Assembly for Python via .NET is an advanced document automation API designed to generate content-rich files from structured data. It enables users to insert charts, tables, barcodes, images, and lists dynamically with fine-grained control. Supports over 50 document formats including Microsoft Office, PDF, HTML, and popular email formats — perfect for building reports, dashboards, or custom documents.
Learn more
About illustration

Ready to get started?

Download GroupDocs.Assembly for free or get a trial license for full access!

Useful resources

Explore documentation, code samples, and community support to enhance your experience.

Explore Powerful Document Features

Use our API to build smart, data-rich documents tailored to your business logic and presentation needs.

Generate Rich Reports in 50+ File Formats

Python via .NET allows seamless chart integration into documents by merging templates with structured data across a wide range of supported formats.

Temporary license tips

1
Sign up with your work email.
Free mail services are not allowed.
2
Use Get a temporary license button on the second step.
 English