ByteScout Premium Suite - VB.NET - Export results to xml, csv, txt with barcode reader sdk - ByteScout

ByteScout Premium Suite – VB.NET – Export results to xml, csv, txt with barcode reader sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Premium Suite – VB.NET – Export results to xml, csv, txt with barcode reader sdk

How to export results to xml, csv, txt with barcode reader sdk in VB.NET with ByteScout Premium Suite

Learn to code in VB.NET to export results to xml, csv, txt with barcode reader sdk with this step-by-step tutorial

An easy to understand sample source code to learn how to export results to xml, csv, txt with barcode reader sdk in VB.NET ByteScout Premium Suite can export results to xml, csv, txt with barcode reader sdk. It can be applied from VB.NET. ByteScout Premium Suite is the set that includes 12 SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording.

The following code snippet for ByteScout Premium Suite works best when you need to quickly export results to xml, csv, txt with barcode reader sdk in your VB.NET application. Follow the instructions from scratch to work and copy the VB.NET code. Want to see how it works with your data then code testing will allow the function to be tested and work properly.

All these programming tutorials along with source code samples and ByteScout free trial version are available for download from our website.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

Module1.vb
      
Imports System.IO Imports Bytescout.BarCodeReader Imports System.Text Imports System.Xml Module Module1 Sub Main() Dim reader As New Reader() reader.RegistrationName = "demo" reader.RegistrationKey = "demo" ' Set barcode type to find reader.BarcodeTypesToFind.All1D = True ' ----------------------------------------------------------------------- ' 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 reader.ReadFromFile("barcodes.pdf") ' Export to files: ' ================ ' 1. Export found barcodes to XML reader.ExportFoundBarcodesToXML("barcodes.xml") ' 2a. Export found barcodes to CSV with default delimiter, quotation and character encoding reader.ExportFoundBarcodesToCSV("barcodes.csv") ' 2b. Export found barcodes to CSV with custom delimiter, quotation and character encoding reader.ExportFoundBarcodesToCSV("barcodes2.csv", "|", "'", Encoding.UTF8) ' 3a. Export found barcodes to plain text file in default character encoding reader.ExportFoundBarcodesToTXT("barcodes.txt") ' 3b. Export only values of found barcodes to plain text file in custom character encoding reader.ExportFoundBarcodesToTXT("barcodes2.txt", True, Encoding.ASCII) ' Get formatted result to a variable for further processing ' ========================================================= ' 1a. Get found barcodes as XmlDocument Dim xmlDocument As XmlDocument = reader.ExportFoundBarcodesToXMLDocument() ' 1b. Get found barcodes as XML string Dim xmlString = reader.ExportFoundBarcodesToXML() ' 2a. Get found barcodes as string in CSV format with default delimiter and quotation Dim csv As String = reader.ExportFoundBarcodesToCSV() ' 2b. Get found barcodes as string in CSV format with custom delimiter and quotation Dim csv2 As String = reader.ExportFoundBarcodesToCSV("|", "'") ' 3. Get found barcodes as string in plain text format Dim txt As String = reader.ExportFoundBarcodesToTXT() ' 4. Get found barcodes as string in JSON format Dim jsonString = reader.ExportFoundBarcodesToJSON() 'Cleanup reader.Dispose() End Sub End Module

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Premium Suite Home Page

Explore ByteScout Premium Suite Documentation

Explore Samples

Sign Up for ByteScout Premium Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Premium Suite Home Page

Explore ByteScout Premium Suite Documentation

Explore Samples

Sign Up for ByteScout Premium Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next