Label Studio Creator logo

Variable Data Printing Beginner Tutorial

Turn one design into many unique labels: connect a CSV/Excel file to merge fields, preview records, and batch print — the beginner foundation for serialized and personalized labels.

Purpose

Variable data printing (VDP) turns one label design into hundreds or thousands of unique labels — each with its own name, SKU, batch, serial, or barcode — from a spreadsheet. This beginner guide connects a CSV/Excel file to label fields, previews records, and batch prints, with no scripting.

It is the foundation for serialized labels, product ranges, price labels, and personalized runs.

Variable dataCSV / ExcelMerge fieldsPreviewBatch printBarcodes
One design, many labels from a data file Data file → template → many labels nameskulot AlphaA-012207 BetaA-022207 GammaA-032208 ${name}${sku} · ${lot} One label per row

1. Prepare the data file

Clean data makes VDP painless. Start from a simple CSV or Excel sheet:

  • Row 1 = headers (e.g. name, sku, lot, price). These become your field names.
  • One record per row; no merged cells or blank header columns.
  • Keep leading zeros safe (format code columns as text so 0123 survives).
  • Use plain UTF-8 for accents and special characters.
Tip: keep a small 3–5 row sample file for testing before you point at the full list.
Good CSV shape nameskulot AlphaA-012207 BetaA-022207 GammaA-032208

2. Connect the data source

Open the Merge panel

Use the Merge / data-source panel and choose your file format (CSV, Excel, JSON, etc.).

Select the file

Point at your CSV/Excel. The app reads the header row and lists available fields.

Check delimiter/encoding

For CSV confirm the separator (comma/semicolon) and UTF-8 so columns split correctly.

Confirm the record count

The panel should show the number of rows it will print — a quick sanity check.

3. Insert merge fields into the design

Fields are placeholders written as ${header}. At print time each is replaced by the current row's value.

  • Add a text object and insert ${name}, ${sku}, etc.
  • Mix fixed text and fields: Lot: ${lot}.
  • Point a barcode's value at a field (e.g. ${sku}) so each label's code changes.
  • Set minimum font / auto-shrink so long values still fit.
Fields in the design ${name} SKU ${sku} · Lot ${lot} value = ${sku}

4. Preview each record

Always preview before printing. Step through records to catch overflow, missing values, and wrong formats while it costs nothing.
Preview controlWhat to check
Next / PreviousStep through several records; the label updates with each row.
First & lastCheck the extremes — longest name, highest serial, edge cases.
Empty valuesRows with blank fields should still look acceptable (or be filtered out).
SelectionPrint all rows or only a selected range/subset.

5. Batch print

Print a short test

Select the first 3–5 records and print them; confirm layout and barcode scans on real media.

Choose the range

Print all records or a subset (e.g. rows 1–500) for staged production.

One label per row

The app generates a unique label for each selected row and sends the batch to the printer or queue.

Save the setup

Save the file so the same design + data mapping can be reprinted later.

6. Common problems and fixes

SymptomLikely cause & fix
Field prints literally as ${name}Header name mismatch or source not connected. Check exact column name.
Leading zeros disappearExcel treated the column as a number. Format it as text and re-import.
Accents look garbledWrong encoding. Re-save the CSV as UTF-8.
Long values overflowEnable auto-shrink / set a smaller minimum font, or enlarge the text box.
Columns merged into oneWrong CSV delimiter. Set comma vs semicolon to match the file.

Where to go next

Next steps: for standardized retail/logistics codes see Barcode GS1; for serialized medical/UDI labels see Medical / UDI; to automate from ERP/e-commerce see Label Server & Hotfolder Automation.