← All posts

2026-10-05

Automate Label Printing Directly From Google Sheets

Automate Label Printing Directly From Google Sheets
pdf labels barcodes label merge browser based graphical layout editor google sheets addin microsoft excel addon electronic shelf labels esl barcode3 labels label editor

Automate Label Printing Directly From Google Sheets

You already have the data. It sits in a spreadsheet — SKUs, product names, barcodes, prices, batch numbers — and it is the single source of truth everyone on the team actually edits.

Then someone has to export those rows to CSV, open a label designer, re-import the data, re-align every field, and print the batch. Again. And again, every time a price changes or a new SKU lands.

If you want to automate label printing from Google Sheets, the goal is simple: the spreadsheet stays where it is, and the labels come out the other side. No export step, no re-import, no field alignment round trip. This article walks through the one-time setup, the pipeline, and the failure handling you need to make that reliable.

Why Manual Label Printing From Google Sheets Wastes Time

The repetitive task is always the same shape:

  • Export the relevant rows to CSV.
  • Open the label designer and load the file as a data source.
  • Re-map columns to fields, because the export order changed again.
  • Print each batch by hand, one file at a time.

The hidden cost is not the ten minutes per batch. It is that any data change — a product update, a price change, a new SKU — forces a full manual round trip before a single label exists. Your spreadsheet is live; your labels are not.

Two groups feel this most:

  • Developers building internal tools who get asked to “just wire up the printing” and end up maintaining a fragile export script.
  • End users in inventory, shipping, and retail who care about one thing: the label on the shelf or the carton matches the data they just typed.

What automation should look like instead: you edit a row, you print. The spreadsheet is the front end, and the label system is the renderer.

That is exactly where the Next Generation Label Printing System (LPSNG) fits — a managed add-on that turns Google Sheets into a label printing front end.

One-Time Setup: Connecting Google Sheets to Your Label System

Setup happens once. After that, printing is a button click.

1. Install the add-on. Get the Google Sheets add-on from the LPSNG integrations page and authorize it against your LPSNG account. The add-on is listed among the platform’s integrations — alongside the Excel interface, the reusable sidebar, and the field script API.

2. Understand the OAuth2 registration. LPSNG uses a simplified OAuth2 registration protocol to connect external systems: a single URL connects the add-on to your LPSNG instance. That URL is the same whether you run the hosted cloud edition or a print station on your own hardware. You register once; the add-on gets a token and refreshes it for you. You never paste a token into a cell.

3. Prepare the sheet. One row per label. Column headers that map cleanly to label fields:

Sheet column Label field
product_name Product name (text block)
barcode Barcode symbol (1D/2D)
price Price text
batch_no Batch / lot number

Keep the header row stable. Renaming barcode to bar_code later is the most common way to break a working setup.

4. Create the layout. Build or import a label layout in the LPSNG label studio, then bind sheet columns to layout fields so each row renders as exactly one label. Barcodes are handled natively — LPSNG supports a range of 1D and 2D barcode formats, so a barcode column renders as a scannable symbol without any extra tooling.

5. Pick the output target once. PDF download, direct print to a configured printer, or PNG for previews. You can preview a batch as PDF and then send the same layout to a thermal printer.

If you are still choosing a platform, the Label Design Software Buying Guide for System Integrators covers the evaluation criteria in more depth.

The Automated Pipeline: From Sheet Edit to Printed Label

Once the mapping exists, there are two ways to trigger output.

On demand. Open the add-on sidebar, select the row or range you care about, and print. This is the everyday path for a single reprint or a corrected price.

Batch with a filter. Run across all rows matching a filter — for example, everything marked status = pending in a helper column. The add-on submits the selection to the LPSNG web service, which renders each row using your saved layout and queues the jobs.

Field-level logic before printing

Real sheets are messy. Dates arrive as timestamps, check digits are missing, and half your product names need a size suffix. Instead of cleaning everything in the sheet, attach a Python script block to the label field itself. Field scripts run before printing and can read and modify the incoming value:

# Illustrative field script attached to the "price" label field.
# The shape is the same for every field: take the incoming value,
# return the string that should end up on the label.
def prepare(value):
    amount = float(value)
    return f"{amount:,.2f} EUR"

The same mechanism handles date formatting, concatenation of two columns into one address block, or computing a check digit from a raw article number. Note that this is field logic — it changes what gets printed, never what is stored in the sheet.

The hard way, for context

You could skip the add-on. The web service API accepts jobs with OAuth2 tokens and raw JSON payloads — that is the same call the add-on makes. But then you own the token refresh, the retry logic, the column mapping, and every breaking change to your own script. If you specifically want that level of control, the web service walkthrough covers the request/response model.

The managed way is the shorter one: edit the sheet, click print, collect the labels. The add-on performs the web service call for you.

Monitoring Jobs and Handling Failures

Printing is I/O, and I/O fails. What matters is that you can see which rows failed and re-run only those.

  • Use the job queue. Submitted print jobs appear in the LPSNG job queue with their status, so you can trace a job back to the sheet rows that produced it.
  • Know the usual suspects. Most failures are one of three things: a required field is empty in a row, the target printer is offline, or a layout field no longer maps to a sheet column (usually after a column rename).

Design the sheet so retries are cheap. Add a status column, or derive it with a formula:

=IF(OR(B2="",C2=""),"BLOCKED","READY")

Now a partial failure is a filter, not a reprint of the whole batch: fix the row, set it back to READY, and print only the READY rows.

For higher volumes or unattended runs, the LPSNG Player — the standalone command-line print engine — takes a package plus a data file and emits PDF, PNG, JSON, or direct print jobs. The invocation has the same shape every time: point it at a package, point it at data, tell it what to emit.

# Package in, data in, files out. Check the Player documentation
# for the exact flag names in your release.
lpsng-player \
  --package ./labels/retail-shelf.lpsng \
  --data ./exports/price-update.csv \
  --out ./out/labels.pdf

Keep an eye on the release notes and the LPSNG blog for add-on and web service changes that affect job submission behavior — that is where questions about changed behavior get answered first.

Best Practices for Reliable Sheet-Driven Label Printing

  • Treat the sheet as a database. Stable headers, one record per row, no merged cells inside the data range. Merged cells are the number one cause of “why is row 47 printing the wrong thing”.
  • Validate before printing. Catch empty barcodes or malformed values with sheet formulas or a Python field script, rather than discovering them on a physical label.
  • Version your layouts. A design change should not silently break an existing sheet mapping. Keep the binding explicit and test the layout against a sample of live rows.
  • Separate test from production. A second sheet, or a filter column, keeps experiments away from the printer.
  • Use roles in multi-user teams. LPSNG’s enterprise features — multi-user, multi-region, multi-device — let you control who edits layouts versus who only prints, which removes the accidental-edit class of failure entirely.

FAQ

Do I need to write code to automate label printing from Google Sheets?

No. The Next Generation Label Printing System Google Sheets add-on handles the connection and job submission for you. You install the add-on, authorize it once via the OAuth2 registration flow, map sheet columns to label fields, and print. Writing your own integration against the web service API is possible but not required.

Can I print to a thermal printer, or only to PDF?

LPSNG can render labels as PDF or PNG and can also send jobs for direct printing to a configured printer. The add-on lets you choose the output target, so you can preview as PDF and then print to your thermal printer from the same layout.

What happens if my sheet has hundreds of rows?

The add-on submits the batch to the LPSNG web service, which renders each row as a label and queues the jobs. You can monitor progress in the job queue. For unattended or very high-volume runs, the LPSNG Player command-line engine is designed to process package-plus-data inputs and output PDF, PNG, JSON, or direct prints.

Does this work with the embedded edition on a Raspberry Pi?

Yes. The embedded edition runs the complete LPSNG on a single-board computer such as a Raspberry Pi, and the same OAuth2 registration and web service interface are used to connect the Google Sheets add-on. This is useful for print stations that need to operate independently of the cloud edition.

Conclusion

The spreadsheet is already your product database, price list, and shipping manifest. Turning it into a label printer is a one-time connection: install the add-on, authorize once, map columns to fields, choose an output target. After that, automating label printing from Google Sheets is a click — not an export, an import, and a re-alignment.

Next step: install the Google Sheets add-on from the integrations page, build one layout in the label studio, and print your first sheet-driven batch from a five-row test sheet.

Related posts

EU label: AI-generated content