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 50+ formats Latest v26.1.0

Choose your platform selecting one updates the snippets below

.NETv25.12.0
dotnet add package GroupDocs.Assembly
Javav26.1.0
com.groupdocs:groupdocs-assembly
Python via .NETv25.5.1
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);
import groupdocs.assembly as ga

def run():
    # Path to the main template
    template = "chart_template.docx"

    # Retrieve managers' productivity data from the source
    data_table = ga.data.DocumentTable("Managers.json", 1)

    # Create an instance of DataSourceInfo with the data
    data = ga.DataSourceInfo(data_table, "managers")

    # Set chart colors using another DataSourceInfo
    design = ga.DataSourceInfo("red", "color")

    # Fill the template with data and save it to the output
    asm = ga.DocumentAssembler()
    asm.assemble_document(template, "result.docx",
        data, design)

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

…and 40+ more document and web formats.

Resources