Following are some guidelines and best practices when creating Code 128 bar codes in Excel using the Softmatic Barcode Add-In.
Code 128 Code Subsets A, B, C
Code 128 has three subsets (dubbed A, B, C):
Code 128A encodes ASCII capital letters, digits 0-9, and control characters like carriage return and TAB
Code 128B encodes ASCII capital letters, small caps, and digits 0-9
Code 128C encodes digits 0-9 in pairs, resulting in a very compact code
The start symbol of a Code 128 barcode determines which subset is used; in addition special control characters
permit switching from one subset to another in the middle of a barcode symbol.
The Softmatic Barcode Add-In for Excel handles all required conversions automatically, thus guaranteeing
the smallest possible compliant barcode.
Code 128 Recommended Size
We recommend a size of 24pt. or higher for Code 128.
Encoding Non-Printable Control Characters With Code 128
As stated above, Code 128 can encode non-printable characters, like TABs. To encode such a character, use the tilde notation
with our add-in: In your data, replace the non-printable character with a tilde, followed by the three digit ASCII code
of the control character. E.g., to encode a TAB, use "~009".
The screenshot shows the data "ABC~009DEF" in A1, the created code in B1:
Scanning this code would result in the
scanner sending "ABC", then a TAB, then "DEF".
Note: This feature can not be used to encode function keys (like F1, F2, F3) with Code 128.
Function keys are not part of the ASCII set,
they are sent to the computer as special control sequences which can not be encoded into a barcode. Likewise,
the special keys on many laptop keyboards (like for brightness or volume control) can't be encoded into a barcode.
barcode scanners have a feature called Function Key Emulation that substitutes a seldom occuring character (e.g. a "§")
with a function key code. Consult your scanner's manual.
Code 128 Sequential Barcodes
The video shows sequential barcodes of type Code 128. Using auto-fill the user creates a series of numbers (100000, 100001, etc.).
The selected serial numbers are then converted to Code 128 barcodes with a single mouse click:
Code 128 Check Digit
Code 128 is always used with a check digit; virtually all barcode scanners on the market expect a check digit
with the code. If the code was printed without a check digit, it will not scan.
Accordingly, the Softmatic Barcode Add-In will always calculate a check digit and append it to the code to
guarantee a compliant code. Any character from the Code 128 characters set can be check digit, even letters or non-
printable characters like TABs or carriage returns. It's therefore common practice to omit the calculated
check digit from the human readable text under the barcode.