[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2795
  • Last Modified:

Print EAN-13 barcodes in Excel

Hello,

I've a friend that is trying to print EAN-13 barcodes using Excel. I used to do this with Code 39 barcodes where we had to put a * in the beginning and end of the string so that the printer could recognize it.
With EAN-13 I've never tryed. I've attached a sample file. We want to print the last column as a EAN-13 barcode.

Can someone please help?

Thanks,

jppinto
CODIPOR.xlsx
0
jppinto
Asked:
jppinto
2 Solutions
 
csoussanCommented:
You can format the numbers with the EAN-13 Barcode font.  I've looked around on the web and I've seen it available for sale in many places but they're all around $99-$150.  I pasted two links below from two of the more commercial looking web sites.  I can't say if they're any good or not as I've never used them.  Hope that helps!

http://barcodewiz.com/ms-office-upc-ean-fonts.aspx

http://www.barcodingfonts.com/barean.htm
0
 
redmondbCommented:
Hi, jppinto.

Like you, I use "3 of 9". However, this page looks interesting for a free Excel-friendly EAN-13 solution.

Word of caution: I've no experience of either the blog or the bar-code sites it links to.

Regards,
Brian.
0
 
DansDadUKCommented:
>> ... with Code 39 barcodes where we had to put a * in the beginning and end of the string ...

But EAN-13 is a much more complex symbology, so you would do well to heed the advice given by  csoussan and redmondb to use a ready-made solution.



Just to give you an idea of the work involved in generating an EAN-13 barcode:

Each encoded barcode message consists of a left-hand guard character, a left-hand encoded value, a centre guard, a right-hand encoded value, and a right-hand guard character.

In more detail:

•      A country code; usually two digits.
The first digit is not explicitly barcoded, but is printed just as a human-readable character, to the left of a left-hand guard symbol.
This digit does, however, affect how the manufacturer code is encoded: hence, the value can subsequently be derived, by a bar-code reader, from the parity of the characters in the left-hand encoded value (i.e. the manufacturer code)
The second digit of the country code is encoded, using the left-hand odd parity (set A) characters, as the first character of a left-hand barcode value.

•      A manufacturer code; usually five digits.
Each of these digits is encoded using the appropriate character from either the left-hand odd parity (set A) characters, or the left-hand even parity (set B) characters.
The parity to be used for each digit, and hence which set is to be used, depends on the first digit of the country code, as shown in the following table:

Character
position -->             1      2      3      4      5
first digit                                    
0                  Odd      Odd      Odd      Odd      Odd
1                  Odd      Even      Odd      Even      Even
2                  Odd      Even      Even      Odd      Even
3                  Odd      Even      Even      Even      Odd
4                  Even      Odd      Odd      Even      Even
5                  Even      Even      Odd      Odd      Even
6                  Even      Even      Even      Odd      Odd
7                  Even      Odd      Even      Odd      Even
8                  Even      Odd      Even      Even      Odd
9                  Even      Even      Odd      Even      Odd

These digits are encoded, using the appropriate set A, or set B characters, as the remaining five characters of the six-character left-hand barcode value.
This is followed by a centre-guard character.

•      A product code; usually five digits.
These characters are encoded, using the right-hand side (set C) characters, as the first five characters of the right-hand barcode value.

•      A check digit character
See the Checksum Calculation section below for details.
This character is encoded, using the right-hand (set C) characters, as the sixth character of the right-hand barcode value.
This is followed by a right-hand guard character, and (optionally) a right-hand light-margin indicator character.



Checksum Calculation
The steps for calculating the check digit are as follows:

•      Consider the right-most digit of the message to be in an "even" position, and assign odd/even to each character moving from right to left.

•      Sum the digits in all odd positions.
•      Sum the digits in all even positions, and multiply the result by 3.
•      Sum the totals calculated in the previous two steps to produce a weighted total.
•      The check digit is the number which, when added to the weighted total, results in a number evenly divisible by 10.
If the weighted total is evenly divisible by 10, the check digit is "0" (not "10").


... and that assumes  that you have either a suitable font (to match the coded characters in the generated 'coded' value), or a means of converting those coded value to appropriate rectangular (bar and space) images.
0
 
leptonkaCommented:
Hi!
To your friend - from my friend:
What you need is the EAN_13.xlsx file you find at the bottom of the page. It is a VBA-free solution:

https://sites.google.com/site/e90e50/user/barcode-codice-a-barre-excel-codice-39

Cheers,
Kris
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now