The sample source code below will teach you how to batch read barcodes to csv with barcode reader sdk in VB.NET. Want to batch read barcodes to csv with barcode reader sdk in your VB.NET app? ByteScout Data Extraction Suite is designed for it. ByteScout Data Extraction Suite is the set that includes 3 SDK products for data extraction from PDF, scans, images and from spreadsheets: PDF Extractor SDK, Data Extraction SDK, Barcode Reader SDK.
The following code snippet for ByteScout Data Extraction Suite works best when you need to quickly batch read barcodes to csv with barcode reader sdk in your VB.NET application. This VB.NET sample code is all you need for your app. Just copy and paste the code, add references (if needs to) and you are all set! Complete and detailed tutorials and documentation are available along with installed ByteScout Data Extraction Suite if you’d like to learn more about the topic and the details of the API.
Our website gives trial version of ByteScout Data Extraction Suite for free. It also includes documentation and source code samples.
On-demand (REST Web API) version:
Web API (on-demand version)
On-premise offline SDK for Windows:
60 Day Free Trial (on-premise)
Imports Bytescout.BarCodeReader Module Program Sub Main() Try 'Read Barcode Process Dim reader As Reader = New Reader reader.RegistrationKey = "demo" reader.RegistrationName = "demo" ' Set Barcode type to find reader.BarcodeTypesToFind.SetAll() ' Output list Dim lstCSVOutput As New List(Of CSVOutputFormat) ' Get all files in folder, and iterate through each file Dim files = System.IO.Directory.GetFiles("BarcodeFiles") For Each fileName As String In files ' ----------------------------------------------------------------------- ' NOTE: We can read barcodes from specific page to increase performance . ' For sample please refer to "Decoding barcodes from PDF by pages" program. ' ----------------------------------------------------------------------- ' Read barcodes Dim FoundBarcodes As FoundBarcode() = reader.ReadFrom(fileName) For Each code As FoundBarcode In FoundBarcodes lstCSVOutput.Add( New CSVOutputFormat With { .barcodeType = code.Type.ToString(), .barcodeValue = code.Value, .scanDateTime = DateTime.Now.ToString(), .fileName = fileName }) Next Next Console.WriteLine("Total {0} barcode found in {1} file.", lstCSVOutput.Count, files.Length) ' Export to CSV ExportToCsv(lstCSVOutput) ' Cleanup reader.Dispose() Catch ex As Exception Console.WriteLine(ex.Message) End Try Console.WriteLine("Press enter key to exit...") Console.ReadLine() End Sub Sub ExportToCsv(ByVal lstCSVOutput As List(Of CSVOutputFormat)) Dim csvOutputContent As New System.Text.StringBuilder(String.Empty) csvOutputContent.Append("Barcode Value,Barcode Type,Scan DateTime,File Name") For Each item As CSVOutputFormat In lstCSVOutput csvOutputContent.AppendFormat("{0}{1},{2},{3},{4}", Environment.NewLine, item.barcodeValue, item.barcodeType, item.scanDateTime, item.fileName ) Next System.IO.File.WriteAllText("output.csv", csvOutputContent.ToString()) Process.Start("output.csv") End Sub Class CSVOutputFormat Public Property barcodeValue As String Public Property barcodeType As String Public Property scanDateTime As String Public Property fileName As String End Class End Module
60 Day Free Trial or Visit ByteScout Data Extraction Suite Home Page
Explore ByteScout Data Extraction Suite Documentation
Explore Samples
Sign Up for ByteScout Data Extraction Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
60 Day Free Trial or Visit ByteScout Data Extraction Suite Home Page
Explore ByteScout Data Extraction Suite Documentation
Explore Samples
Sign Up for ByteScout Data Extraction Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: