Barcode Image Intrepretation method

QC2015

New Member
Joined
Jan 10, 2016
Messages
4
I would like to take a bar code image file in a .jpg format and return a text value via a subroutine or function in VBA.

Any help would be greatly appreciated in terms of code snipets, weblinks and/or reference libraries.


 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Thank you for the reply. I should have specified 1D barcode, specifically Code 39. So to amend the text above.


I would like to take a 1D, Code 39 bar code image file in a .jpg format and return a text value via a subroutine or function in VBA.


Thank you for your help. Cheers
 
Upvote 0
If you use a barcode scanner and set it for Code 39 (or Code 3of9) you should be able to scan the barcode straight into Excel. Do note that jpg images are far from ideal for this, due to compression artefacts that are liable to occur within the barcode. If you want to actually read and parse the jpg file in VBA, that adds a whole load of extra complexity.
 
Upvote 0
I do have a barcode scanner and it easily scans the barcode straight into Excel. I could talk about potential application but it will add levels of confusion that do not solve my issue. What I am looking for is as below:

"I would like to take a 1D, Code 39 bar code image file in a .jpg format and return a text value via a subroutine or function in <acronym title="visual basic for applications" style="border-width: 0px 0px 1px; border-bottom-style: dotted; border-bottom-color: rgb(0, 0, 0); cursor: help; color: rgb(51, 51, 51); background-color: rgb(250, 250, 250);">VBA</acronym>."

I do realize there is compression artifacts in most image types. The root of the question is what mechanism can I use to make the interpretation.
 
Upvote 0
If you're wedded to jpg processing, you will have to sort out how to identify from the jpg data where the barcode scan begins and ends, how to recognise differentiate the wide & narrow bars from compression artefacts, plus decode the bar sequence. The last part is quite straightforward but you have some major hurdles to overcome before you get there.

PS: Kindly don't PM me again for help about this: keep your posts in the public forum where they belong.
Please read our policy on NOT using Private Message system to request specific assistance, in rule #4: http://www.mrexcel.com/forum/board-announcements/99490-forum-rules.html
 
Last edited:
Upvote 0
I am not wedded to jpg processing. I only mentioned jpg as it is the first file type I thought of. The file type can be anything that I can capture and save which I think is anything. These are issues I am not aware about as I am starting from scratch. If a GIF, of TIFF or PNG is better, I am open to anything. The description of the title simplifies what I am looking for to its most basic form

Barcode (Type 39) Image (Whatever one works) Intrepretation (processing) method

Also: Sorry about the PM, this is my first thread on here. Cheers
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,173
Members
451,543
Latest member
cesymcox

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top