7Data Binding β Making Components Talk to Data
Data binding is the core feature of Abiao Label Designer. Simply put, it links a "field" (column) from a data source (Excel/database) to a "component" on the label. When printing, the software automatically substitutes component content with data.
7.1 Understanding Binding with an Example
Suppose you have an Excel file:
| Product Name | Price | Barcode |
|---|---|---|
| Apple | $5.00 | 6901234567890 |
| Banana | $3.50 | 6901234567891 |
| Orange | $6.00 | 6901234567892 |
You want to print 3 labels, each showing different product info. Here's how:
Step 1: Import data β Follow Chapter 6 to import the Excel file.
Step 2: Add components β Add three text components and one barcode component to the canvas. Arrange them.
Step 3: Bind data β Select the "Product Name" text component. In the Properties Panel β Data Binding:
- Turn on "Enable Binding"
- Select your imported Excel as the "Data Source"
- Select "Product Name" as the "Field Mapping"
Step 4: Repeat binding β Similarly bind the "Price" text component to the "Price" field, and the barcode to "Barcode".
Step 5: Preview β Go to Print β Print Preview. You'll see all 3 labels with different product data.
7.2 Binding Settings Reference
| Setting | Description |
|---|---|
| Enable Binding | ON: content from data source; OFF: use static text |
| Data Source | Choose the data (Excel workbook, database table, variable set, etc.) |
| Field Mapping | Choose the specific field (column) from the data source |
| Data Format | Format numbers and dates, e.g. "$#,##0.00" (currency), "yyyy-MM-dd" |
| Default Value | What to show when a value is null (e.g. "N/A") |
| Transform Rules | Additional processing: uppercase/lowercase, add prefix/suffix text, take first N characters, etc. |
7.3 Data Format Examples
| Raw Data | Format String | Result |
|---|---|---|
| 1234.5 | $#,##0.00 | $1,234.50 |
| 0.85 | 0% | 85% |
| 2026-05-17 14:30:00 | yyyy-MM-dd | 2026-05-17 |
| 2026-05-17 14:30:00 | MM/dd HH:mm | 05/17 14:30 |
| abc123 | (uppercase) | ABC123 |
π About Table component binding:
Table binding works differently β you bind the entire table to a data source (table or query), and the software fills rows and columns automatically. No need to bind each cell individually.