GroupDocs.Assembly for Python via .NET

Embed Barcodes in XLSX Files with Python API

With GroupDocs.Assembly for Python via .NET, you can seamlessly create and insert dynamic barcodes into your XLSX documents, streamlining data labeling and automation.

How to Insert a Barcode into a XLSX Document

With GroupDocs.Assembly, you can easily embed barcodes into XLSX templates. Supports 1D and 2D barcode formats including QR, Code 128, Data Matrix, and more.

  1. Design a XLSX template using predefined barcode tags.
  2. Pull structured data from your preferred source (e.g., JSON, XML, databases).
  3. Customize barcode settings such as size, resolution, or symbology.
  4. Generate and save a new document with the embedded barcode.
# Use this tag in your template to automatically generate and insert a barcode
# <<barcode [barcode_expression] -barcode_type>>

import groupdocs.assembly as ga

    def run():

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

        # Connect to your preferred data source
        data = ga.DataSourceInfo(GetData(), "label")

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

Automate Document Creation with Data-Driven Templates

GroupDocs.Assembly for Python via .NET simplifies the process of generating rich, dynamic documents. Add visual and functional elements such as tables, charts, lists, hyperlinks, barcodes, and images using smart template markup.

GroupDocs.Assembly Features

Generate Reports from Structured Data

Use GroupDocs.Assembly to merge JSON, XML, CSV, and other data formats into templates for automated document generation in common file types.

Visualize Data with Embedded Elements

GroupDocs.Assembly supports integration of native components like tables, charts, lists, hyperlinks, barcodes, and images for comprehensive, visually appealing documents.

Custom Data Placement in Templates

Precisely control where content appears using LINQ-based expressions. Easily loop through arrays and apply custom styles and colors programmatically.

Broad Format Compatibility

Generate documents in widely-used formats including DOCX, XLSX, PPTX, HTML, PDF, and various email formats. Nest documents when needed to streamline workflows.

Example: Dynamically Generate a Barcode

This sample illustrates how to dynamically insert a barcode into a XLSX file using GroupDocs.Assembly.

Python

# Prepare the template with barcode placeholder tags
# <<barcode [barcode_expression] -barcode_type>>

import groupdocs.assembly as ga

    def run():

    # Specify the file path of the template
    template = "barcode_template.xlsx"

    # Obtain structured data from your source
    data_csv =
        ga.data.CsvDataSource("Barcode Labels.csv", 
        ga.data.CsvDataLoadOptions(True))

    # Construct a data object with only relevant fields
    data = ga.DataSourceInfo(data_csv, "label")

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

    # Define barcode-specific properties (e.g., type, size)
    asm.barcode_settings.resolution = 1200
    asm.barcode_settings.base_y_dimension = 5

    # Save the completed document with the barcode inserted
    asm.assemble_document(template, "result.xlsx", data)
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 a powerful document generation API designed for seamless integration of business data into custom templates. Easily insert charts, lists, barcodes, tables, or images into more than 50 file types — including PDF, Microsoft Office formats, and email documents. Automate reporting and document creation directly within your application workflows.
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.

Key Functional Highlights

Our API is designed to handle complex document generation scenarios, improving efficiency and reliability in business document workflows.

Generate Documents in Leading File Formats

Python via .NET supports output to over 50 file types, enabling seamless data integration and document generation from custom templates.

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