GroupDocs.Assembly for .NET

Generate data tables in XLSX documents using our .NET API

GroupDocs.Assembly for .NET makes it easy to dynamically fill tables in XLSX documents with data from various sources.

How to populate a table in a XLSX document

GroupDocs.Assembly lets you dynamically populate tables in templates for formats like XLSX. Insert data from various sources into your tables.

  1. Create a XLSX template with table placeholders.
  2. Fetch data from any supported source.
  3. Filter the data to include only the required information.
  4. Save the document with the populated table.
// Add these tags into a template table row
// <<foreach [c in ds]>>
// <<[c.Client]>><<[c.Manager]>><<[c.Price]>>
// <</foreach>>

// Set the file path for the template
string template = "table_template.xlsx";

// Fetch data from a supported source
DataSourceInfo data 
    = new DataSourceInfo(GetData(), "ds");

// Save the document with the table filled with data
DocumentAssembler asm = new DocumentAssembler();
asm.AssembleDocument(template, "result.xlsx", data);
dotnet add package GroupDocs.Assembly
click to copy
copied
More examples Documentation

Generate documents with dynamic tables

GroupDocs.Assembly for .NET streamlines document creation by automating table population and supporting additional elements like charts, lists, and images through templates and advanced markup.

Key Features of GroupDocs.Assembly

Create reports from structured data

The API processes data from sources such as JSON, XML, and CSV to populate tables in office documents efficiently and accurately.

Display data visually

GroupDocs.Assembly enables the creation of tables, lists, and charts, along with embedding text, links, and images for professional document design.

Precisely position table data

Use LINQ-based syntax to dynamically add table rows and columns. Customize styles, including colors and formatting, programmatically.

Supports a wide range of formats

Easily handle popular file formats like MS Office, OpenOffice, PDF, and HTML. Seamlessly insert populated tables into supported document types.

How to dynamically populate a data table

This example demonstrates how to fill a table in a XLSX document using dynamic data.

C#

// Prepare a template with a placeholder for the table
// <<foreach [c in items]>> <<[c.Client]>><<[c.Manager]>>
// <<[c.Price]>> <</foreach>>

// Specify the file path to the template
string template = "table_template.xlsx";

// Retrieve data from your chosen source
JsonDataSource data_json = 
  new JsonDataSource("Items.json");

// Create a data source object with the necessary data
DataSourceInfo data 
    = new DataSourceInfo(data_json, "items");

// Initialize DocumentAssembler
DocumentAssembler asm = new DocumentAssembler();

// Save the completed document with the populated table
asm.AssembleDocument(template, "result.xlsx", data);
dotnet add package GroupDocs.Assembly
click to copy
copied
More examples Documentation

GroupDocs.Assembly for .NET Overview

GroupDocs.Assembly for .NET is built to create documents and reports by filling templates with data from multiple sources. Effortlessly insert structured data into tables, lists, and charts, or embed images dynamically. Advanced syntax ensures accurate data placement. Supports over 50 formats, including PDFs, MS Office documents, and email files.
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 key features

Our solution simplifies the creation of professional documents with dynamically populated tables and additional elements.

Create reports with detailed tables

.NET enables the creation of comprehensive reports by filling templates with tables and other data elements in over 50 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