Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Barcode scanner with Excel/VBA

At work I'm trying to make a program on Excel where if a barcode is scanned, it pulls up the info on the barcode and inputs the data in following cells.
Not sure how complicated it would be, the idea was just proposed today.

Basically in A1, barcode would be scanned > inputs data in A2, A3, and A4 about said barcode (which would have to be pre-programmed I'm sure) > then tabs over to A5 next.

Any idea where to start or can anyone give me some pointers on how doable this is?

Thank you.
you got two things here, the device that scans (it be a camera or an actual scanner) and the event that is going to send the data to the excel with the right data format.
You can use microsoft's excel library to read through the excel sheet and picking up the bar code and applying the corresponding barcode reader api you can write the data back to excel using same excel library. sounds possible?
In school we worked with a Phidgets' RFID scanner. The thing was easy to work with. It just outputted a string for you to use with 1 line of code and they had an existing .NET API. I imagine for barcodes it wouldn't be much different.
Yeah the main thing is getting the barcode scanned and it recalling the data and auto filling into the corresponding cells.
But it'll never be the same cells when scanned because it's a check in/check out list.

Ideally it'll autofill the cells A-D without knowing the exact row (since it wouldnt be an exact row with a certain scan) and if I could set up a direct time stamp when the item is scanned that'd be awesome too.

I have to look more into the scanner when I get to work today. Not sure if it's a cheap little one or one that is actually workable.
(Jul 17, 2017 10:16 AM)lost my mind Wrote:  Yeah the main thing is getting the barcode scanned and it recalling the data and auto filling into the corresponding cells.
But it'll never be the same cells when scanned because it's a check in/check out list.

Ideally it'll autofill the cells A-D without knowing the exact row (since it wouldnt be an exact row with a certain scan) and if I could set up a direct time stamp when the item is scanned that'd be awesome too.

I have to look more into the scanner when I get to work today. Not sure if it's a cheap little one or one that is actually workable.

There are plenty of libraries for working with Excel, so that isn't the issue.

Just find out what the barcode scanner outputs and go from there.
99% barcode readers out there works as "keyboard emulator".
If you scan a Code-39, EAN-128, ... the barcode reader "write" the code where you have the focus, so if you have the focus on cell A1, it prints (or write emulated) the code on cell A1.

A really "Professional" programmer should communicate with the barcode reader using TCP/IP or RS232 protocol, get the "code" and putting that code somewhere no matters where the app has the focus.
(Jul 17, 2017 11:53 AM)Zilog80 Wrote:  99% barcode readers out there works as "keyboard emulator".
If you scan a Code-39, EAN-128, ... the barcode reader "write" the code where you have the focus, so if you have the focus on cell A1, it prints (or write emulated) the code on cell A1.

A really "Professional" programmer should communicate with the barcode reader using TCP/IP or RS232 protocol, get the "code" and putting that code somewhere no matters where the app has the focus.
This, Zilogy is spot on. Ive seen in the old days of product scanners and they indeed mimic the nummeric keypad.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Shell] by thecowmilk_Oct 30, 2021 09:42 AM 0 107 Oct 30, 2021 09:42 AM
Last Post: thecowmilk_
[.NET] by canasovaSep 12, 2020 04:43 PM 1 170 Sep 12, 2020 04:43 PM
Last Post: T0Bi
[.NET] by Firebrand47Apr 9, 2020 07:42 PM 1 164 Apr 9, 2020 07:42 PM
Last Post: ArcticSlay