# Print barcode labels from Excel with name and price

> Markdown version of https://stella.sh/how/printing-labels/make-barcode-labels-from-excel for agents and LLMs.
> Make shelf labels with product name, price and a UPC barcode that scans, from a stock spreadsheet, leading zeros kept: Word's barcode field, or Stella (stella.sh).

Word for Windows can draw barcodes in a label mail merge with its MERGEBARCODE field; Word for Mac can't, so Mac users need a barcode font or a label program. Either way, set the UPC column to text first: Excel drops the leading zero, and a barcode of the shorter number scans as a different product. Stella (stella.sh) reads the stock sheet on your computer, restores the zeros, and writes a label PDF with each barcode test-scanned.

- Checked: 14 November 2026
- Stella does it on: Windows, Mac, Linux

## Stella doing it

Recorded 14 November 2026 on Linux (Omarchy) with Claude Code with Opus, on a Claude plan.
Result: 36 labels on two sheets in about two minutes. Checked afterwards against an answer key written before the run: US Letter pages, every product's barcode scanning as its 12-digit UPC with the leading zero inside its 5160 label, name and price on the same label, one label per product, nothing outside the labels, and the spreadsheet unchanged. The shop and products are made up for this run, with valid UPC check digits. The barcodes were scanned from the PDF by software, not with a handheld scanner. The work is sped up 6×.

Video (45 s): https://stella.sh/media/proofs/printing-labels/make-barcode-labels-from-excel/proof.mp4

Transcript:

- 0:00 Stella on a Linux computer. A stock spreadsheet is in Documents.
- 0:02 The prompt: shelf labels with name, price and a barcode that scans, for Avery 5160.
- 0:12 Stella replies: it will use the sheet's UPCs and test that every barcode scans.
- 0:17 Reading the stock list, making and checking the labels, sped up 6×.
- 0:31 Done: 36 labels on two pages, leading zeros restored on 22 codes, every barcode test-scanned.

What Stella does:

1. Finds `Pantry & Larder stock list.xlsx` in Documents: 36 products with SKU, name, UPC and price
2. Notices 22 UPCs that had lost their leading zero because Excel stored them as numbers, and puts the zeros back before making barcodes
3. Lays out one label per product on Avery 5160 sheets: product name, price, and a UPC barcode
4. Scans every barcode in the finished file to confirm it reads as the right code
5. Saves `Pantry & Larder shelf labels (Avery 5160).pdf` next to the stock list: one full sheet of 30 and six labels on a second

## The prompt to paste

```text
Make shelf labels for every product in my stock spreadsheet in Documents, with the product name, the price and a barcode that scans, laid out for Avery 5160 label sheets.
```

## Make them yourself

1. **Turn the UPCs into text.** In Excel, add a column with `=TEXT(C2,"000000000000")` (twelve zeros for UPC-A), fill it down, then copy and Paste Values over the UPC column. A UPC like 003292694568 must stay twelve digits.
2. **Windows: merge with a barcode field.** In Word: Mailings, Start Mail Merge, Labels, Avery US Letter 5160. Open the stock sheet as recipients. In the first label insert the product name and price fields, then Ctrl+F9 and type `MERGEBARCODE UPC UPCA` inside the braces. Update Labels and Finish & Merge.
3. **Mac: use a barcode font or label program.** Word for Mac has no barcode field. Install a UPC barcode font and format the merged UPC field with it (most UPC fonts need the digits encoded first), or use the label maker's own online designer, which reads a spreadsheet.
4. **Scan one before printing all.** Print a test sheet at 100% on plain paper and scan a few labels with your actual scanner or point-of-sale app. Small barcodes from inkjet printers sometimes need to be printed larger.

## Where Stella stops

- Stella makes barcodes from the codes you already have. It doesn't assign new UPCs; those come from GS1 if you sell through retailers.
- The barcodes were checked by scanning the PDF with software. Scan a printed label with your own scanner before printing them all.
- Product names, prices and codes go to the AI model you use in Stella. The labels are made on your computer.
- It makes the PDF; it doesn't print it unless you ask. Print at Actual size, not Fit to page, or the labels won't line up.
- Recorded on Linux, where Stella installed small Python libraries for the PDF and barcodes. On a Mac or Windows PC it may install Python first, which wasn't recorded.

## Questions

**Why won't my barcode scan as the right product?**
Usually a lost leading zero: 003292694568 stored as 3292694568 makes a different, shorter code. The other common cause is a barcode printed too small or squashed.

**Can it use Code 128 or my own SKUs instead of UPCs?**
Yes. Say which column and which barcode type; Code 128 suits internal SKUs with letters in them.

**Can I use other label sizes?**
Yes: name the sheet (5160, 5163, 5167) or give the measurements. For address labels from a list, see [address labels from Excel](https://stella.sh/how/printing-labels/print-address-labels-from-excel).

**What about QR codes for product pages?**
See [make QR codes in bulk](https://stella.sh/how/printing-labels/make-qr-codes-in-bulk), one image per link.

**Is Stella free for this?**
Yes. Free with the ChatGPT or Claude plan you already have. Sign in with your ChatGPT plan, or use your Claude plan through Claude Code, and this task costs nothing extra. New accounts also get a small free trial of Stella’s own models.

**Can I control what Stella changes on my computer?**
Yes. Stella works on Windows, Mac and Linux with your own files and shows each step in the chat, so you can watch it and stop it at any point. Tell it what it may not do, as the prompts on these pages do (“don't delete anything without asking”). In the Downloads recording it deleted nothing until it was told to go ahead. It also refuses commands that would wipe a whole disk, your home folder or system folders.

Sources: [Microsoft Support: Add barcodes to labels](https://support.microsoft.com/en-us/word/add-barcodes-to-labels), [Microsoft Support: Field codes: MergeBarcode](https://support.microsoft.com/en-us/word/field-codes-mergebarcode).

## Related problems

- [Print address labels from Excel on Avery 5160 sheets](https://stella.sh/how/printing-labels/print-address-labels-from-excel.md)
- [Make a QR code for every link in a spreadsheet, in bulk](https://stella.sh/how/printing-labels/make-qr-codes-in-bulk.md)
- [Print packing slips for unshipped orders from your export](https://stella.sh/how/printing-labels/make-packing-slips-from-orders.md)
- [Print envelopes from an Excel guest list, one per household](https://stella.sh/how/printing-labels/print-envelopes-from-excel.md)
- [Make name tags from a registration list](https://stella.sh/how/printing-labels/make-name-tags-from-a-list.md)
- [Generate certificates from an Excel list, one per person](https://stella.sh/how/printing-labels/make-certificates-from-excel.md)

Get Stella: https://stella.sh/download. Free with the ChatGPT or Claude plan you already have.
