ByteScout tutorials describe the stuff for programmers who use VBScript. ByteScout Premium Suite helps with barcodes to excel with barcode reader sdk in VBScript. ByteScout Premium Suite is the bundle that includes twelve SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording.
Want to speed up the application development? Then this VBScript, code samples for VBScript, developers help to speed up the application development and writing a code when using ByteScout Premium Suite. If you want to know how it works, then this VBScript sample code should be copied and pasted into your application’s code editor. Then just compile and run it. This basic programming language sample code for VBScript will do the whole work for you in implementing barcodes to excel with barcode reader sdk in your app.
Visit our website to get a free trial version of ByteScout Premium Suite. Free trial contains many of source code samples to help you with your VBScript project.
On-demand (REST Web API) version:
Web API (on-demand version)
On-premise offline SDK for Windows:
60 Day Free Trial (on-premise)
if WScript.Arguments.Count < 1 Then
MsgBox "Run with the folder path as the argument" & vbCRLF & vbCRLF & "MultipleTypeBarcodeToExcel.vbs <InputFolder>"
WScript.Quit 0
End If
Set objFSO = CreateObject("Scripting.FileSystemObject")
' define allowed input images extensions
inputImagesExtensions = "JPG,JPEG,PNG,BMP,PDF,TIF"
Set reader = CreateObject("Bytescout.BarCodeReader.Reader")
' Set multiple barcode types for searching
reader.BarcodeTypesToFind.Code39 = True
reader.BarcodeTypesToFind.QRCode = True
reader.BarcodeTypesToFind.PDF417 = True
reader.BarcodeTypesToFind.EAN13 = True
' Set excel document
Set document = CreateObject("Bytescout.Spreadsheet.Spreadsheet")
' Set document keys
document.RegistrationName = "demo"
document.RegistrationKey = "demo"
' Add new worksheet
Set worksheet = document.Workbook.Worksheets.Add("BarCodes")
' Set cell index value
Dim CellIndex
CellIndex = 0
' Set Initial Value
CellIndex = (CellIndex + 1)
Set cell_value = worksheet.Cell_2("A" + Cstr(CellIndex))
Set cell_filename = worksheet.Cell_2("B" + Cstr(CellIndex))
cell_value.Value = "Barcode Value"
cell_filename.Value = "File Name"
Set objInputFolder = objFSO.GetFolder(WScript.Arguments(0))
Call ProcessFolder(objInputFolder)
' delete output file if exists already
Set fso = CreateObject("Scripting.FileSystemObject")
If (fso.FileExists("output.xls")) Then fso.DeleteFile("output.xls")
Set fso = nothing
' save document
document.SaveAs "output.xls"
WScript.Echo "successfully created 'output.xls' file!"
' close Spreadsheet
Set document = Nothing
WScript.Quit 0
Sub ProcessFolder(folder)
Set objFolder = objFSO.GetFolder(folder.Path)
Set colFiles = objFolder.Files
For Each objFile in colFiles
' Check the file type
If inStr(inputImagesExtensions, UCase(objFSO.GetExtensionName(objFile.Name))) > 0 Then
reader.ReadFromFile objFile.Path
For i = 0 To reader.FoundCount - 1
' Get cell value
CellIndex = (CellIndex + 1)
Set cell_value = worksheet.Cell_2("A" + Cstr(CellIndex))
Set cell_filename = worksheet.Cell_2("B" + Cstr(CellIndex))
' set cell value
cell_value.Value = reader.GetFoundBarcodeValue(i)
cell_filename.Value = objFile.Name
' Write to console
WScript.Echo "Extracted barcode '" & reader.GetFoundBarcodeValue(i) & "' from '"& objFile.Name &"' file"
Next
End If
Next
For Each subFolder in folder.SubFolders
ProcessFolder subFolder
Next
End Sub
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
REM running from the command line
cscript.exe MultipleTypeBarcodeToExcel.vbs "InputFiles"
pause
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: