GroupDocs.Assembly

Generate documents and reports from templates and data using LINQ syntax — with a single, consistent API across .NET, Java, and Python.

3 platforms 40+ formats Latest v26.11.0

Choose your platform selecting one updates the snippets below

.NETv26.7.0
dotnet add package GroupDocs.Assembly
Javav26.10.1
com.groupdocs:groupdocs-assembly
Python via .NETv26.11.0
pip install groupdocs-assembly-net

Getting started with .NET

using System;
using GroupDocs.Assembly;
using GroupDocs.Assembly.Data;

// Path to the main template
string template = "chart_template.docx";

// Retrieve managers' productivity data from the source
DocumentTable data_table =
    new DocumentTable("Managers.json", 1);

// Create an instance of DataSourceInfo with the data
DataSourceInfo data
    = new DataSourceInfo(data_table, "managers");

// Set chart colors using another DataSourceInfo
DataSourceInfo design =
    new DataSourceInfo("red", "color");

// Fill the template with data and save it to the output
DocumentAssembler asm = new DocumentAssembler();
asm.AssembleDocument(template, "result.docx", data, design);
import com.groupdocs.assembly.*;

// Path to the main template
String template = "chart_template.docx";

// Retrieve managers' productivity data from the source
DocumentTable data_table =
    new DocumentTable("Managers.json", 1);

// Create an instance of DataSourceInfo with the data
DataSourceInfo data
    = new DataSourceInfo(data_table, "managers");

// Set chart colors using another DataSourceInfo
DataSourceInfo design =
    new DataSourceInfo("red", "color");

// Fill the template with data and save it to the output
DocumentAssembler asm = new DocumentAssembler();
asm.assembleDocument(template, "result.docx", data, design);
from groupdocs.assembly import DataSourceInfo, DocumentAssembler

# Chart data: one dict per manager
managers = [
    {"Manager": "Mei", "Total_Contract_Price": 230000},
    {"Manager": "Daniel", "Total_Contract_Price": 120000},
    {"Manager": "Sofia", "Total_Contract_Price": 80000},
]

# Set chart colors using another DataSourceInfo
color = DataSourceInfo("Coral", "color")

# Fill the template with data and save it to the output
DocumentAssembler().assemble_document(
    "dynamic-chart-series-color.docx", "chart-report.docx",
    [DataSourceInfo(managers, "managers"), color])

Popular classes & namespaces

Key capabilities

  • Template-based document generation
  • LINQ reporting syntax
  • Data from DB, XML, JSON & objects
  • Charts, tables & lists
  • Mail merge
  • Cross-format output

Supported formats

WordExcelPowerPointEmailPDFHTML

...plus OpenDocument, Markdown, text, XPS, TIFF, SVG and EPUB.

Resources