Writing BarTender Script with SQL and Excel

Problem

A customer needed to print labels where the data was split between and SQL database and an Excel file. With over 2,000 lines of label information, the customer had complex rules as to when to use the SQL data vs the Excel data and they didn’t have the resources to integrate the data into BarTender by themselves.

Solution

An EMP Engineer designed a BarTender label that linked to both an SQL database and an Excel file, allowing dynamic data retrieval. They also created a BarTender script to implement customer-specific rules for processing and formatting the data. This setup ensured accurate and efficient label printing with the correct information displayed as per the customer’s requirements.

Story

Managing label data and printing with BarTender can be challenging, especially with frequently changing label quantities and data. The customer’s distribution center needed to scan a barcode or select a part number to print the correct number of labels for each product box. Although familiar with SQL, they didn’t know how to input data from an Excel sheet into BarTender. EMP’s product expertise came to the rescue. Newer versions of BarTender support “multi-database joins” with SQL, Excel, Oracle, etc. This feature allowed programmers to design a Bartender script to combine the Excel data with the SQL data, enabling BarTender to adjust the label quantity based on the part number. Now, the customer can be assured that each label print will have the correct quantity, ensuring proper labeling of product boxes. EMP has also supported similar solutions by assisting with label data formatting, mobile computer support, and data collection within the customer’s IT infrastructure.

Download the Customer Solution PDF

Check Out More Customer Solutions

Oil Container

RFID Match Code

A motor oil manufacturer recently converted their inventory to RFID tags in compliance with new mandates. But with the transition they were having trouble verifying

Read More »
MES Manufacturing Execution System icon plus the BarTender cloud logo

Custom MES Using BarTender

A specialized parts manufacturer was looking to track and record calibration throughout assembly process. This solution involved heavy custom programming as well as short term

Read More »

Interested in a similar solution?

Contact Us