Creating barcodes in iWork Numbers
ConnectCode Barcode Software allows the creation of industry compliant barcodes in iWork Numbers easily using Open Type Barcode Fonts. This tutorial describes the process of creating large number of barcodes in iWork Numbers using AppleScript, Barcode Command and Open Type Fonts from ConnectCode Barcode Software (available on the Mac App Store). The different components required are described below.
Numbers is a spreadsheet application in the iWork suite developed by Apple. It is a widely used application on the Mac platform and allows users to carry out a wide variety of productivity and number crunching tasks.
AppleScript is a powerful and versatile scripting language built into macOS for automating repetitive tasks.
ConnectCode Barcode Software (available on the Mac App Store)
This package includes the Open Type barcode fonts for displaying the barcodes.
ConnectCode Barcode Command
ConnectCode Barcode Command is a command line application/utility for generating barcodes in macOS. This command line utility validates input data, and adds the necessary start/stop and check characters required by a barcode. It works hand in hand with AppleScript to bulk create barcodes in iWork Numbers.
- iWork Numbers is installed.
- ConnectCode Barcode Software is installed.
ConnectCode Barcode Software is available on the Mac App Store. After installing the software, setup the Open Type Fonts as described in https://www.barcoderesource.com/macbarcodefontssetup.shtml.
- ConnectCode Barcode Command is installed.
Free download at https://www.barcoderesource.com/commandlinebarcodemac.shtml.
After unzipping the download, copy the “numbersBarcode.scpt” script file and “BarcodeCommand” application to the user home directory (you can find the home directory in Finder –> Go -> Home).
Tutorial on creating barcodes in iWork Numbers
- Launch iWork Numbers and create a Blank spreadsheet.
- In cell A1, enter the value “12345”. Click on the menu View -> Show Inspector. Select the “Cell Format” to be “Text”.
- Copy cell A1 (Command C) and paste (Command V) it to the next 5 rows as shown below. We are going to use AppleScript to create barcodes for these 5 rows of data.
- Launch Apple Finder and go to the user's home directory. Ensure that the “BarcodeCommand” and “numbersBarcode” files are in this directory as specified in the prerequisite section.
- Double click on the “numbersBarcode” file. The AppleScript editor will be automatically launched to display the contents of the file. Click on the “Run” button to execute the script. The “numbersBarcode” file is an AppleScript file that executes “BarcodeCommand” command line application (located in the user home directory) to convert the data in the first 5 rows of iWork numbers to Code 39 barcodes. Details on how to customize “BarcodeCommand” to create different types of barcodes are available in https://www.barcoderesource.com/commandlinebarcodemac.shtml.
The output of the script will be placed in column “B” of the Numbers spreadsheet as shown below.
- The final step involves changing the font of the barcode output in column B. Select cell B1 to cell B5 and click on the menu Format -> Fonts -> Show Fonts. In the Font dialog, select the “CCode39_S3” as the font family and “24” as the font size.
You have successfully created a list of industry compliant Code 39 barcodes. The “numbersBarcode” script can be easily customized to create different types of barcodes in iWork Numbers.
Back to Barcode Software for Mac page.