GroupDocs.Assembly for .NET

Add barcodes to XLSX documents using our .NET API

GroupDocs.Assembly for .NET offers full support for creating and embedding barcodes dynamically in XLSX documents.

Steps to add a generated barcode to a XLSX document

GroupDocs.Assembly makes it easy to insert barcodes into templates in formats like XLSX. Supports over 60 barcode types, including one-dimensional and two-dimensional formats.

  1. Prepare a XLSX template with barcode placeholders.
  2. Retrieve data from any supported data source.
  3. Configure additional properties like barcode size or resolution.
  4. Save the template with the barcode as a new document.
// Insert this tag into your template to generate a barcode in the final document
// <<barcode [barcode_expression] -barcode_type>>

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

// Retrieve data from your source
DataSourceInfo data 
    = new DataSourceInfo(GetData(), "label");

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

Generate documents by filling templates with data

GroupDocs.Assembly for .NET is designed to simplify the creation of documents in popular formats. Add charts, lists, tables, hyperlinks, images, and barcodes using advanced templates and markup.

GroupDocs.Assembly Features

Create reports from business data

Our API efficiently populates documents in popular office formats using data from sources like JSON, XML, and CSV.

Use visual elements to display data

GroupDocs.Assembly supports embedding native elements such as lists, tables, and charts, along with text, hyperlinks, images, and dynamically generated barcodes.

Insert data anywhere in the document

Use LINQ-based syntax to place data exactly where it’s needed. Arrays can be inserted using for-each loops, and formatting (e.g., color) can be customized programmatically.

Supports a wide range of formats

Process popular file formats like MS Office, OpenOffice, PDF, HTML, and various email formats. Embed one document into another as needed.

How to generate a barcode dynamically

This example demonstrates embedding a dynamically generated barcode into a XLSX document.

C#

// Use this template to insert a barcode into the document
// <<barcode [barcode_expression] -barcode_type>>

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

// Retrieve data from your chosen source
CsvDataSource data_csv =
    new CsvDataSource("Barcode Labels.csv", 
    new CsvDataLoadOptions(true));

// Create a data source object with only the required data
DataSourceInfo data 
    = new DataSourceInfo(data_csv, "label");

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

// Set additional barcode properties
asm.BarcodeSettings.Resolution = 1200;
asm.BarcodeSettings.BaseYDimension = 5f;

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

Overview of GroupDocs.Assembly for .NET

GroupDocs.Assembly for .NET is built to help you generate documents and reports by integrating data from a wide variety of sources. Populate documents with text or numerical data, create charts, tables, and lists, or insert images and barcodes on the fly. Use advanced markup to place data precisely where needed. Supports over 50 formats, including PDF, MS Office files, and emails.
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 is designed to streamline your business document processing needs.

Create reports in popular formats

.NET supports generating reports in over 50 formats, allowing you to seamlessly merge data and templates for outstanding results.

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