ByteScout BarCode Generator SDK - C# - Generate Barcodes from Excel - ByteScout

ByteScout BarCode Generator SDK – C# – Generate Barcodes from Excel

  • Home
  • /
  • Articles
  • /
  • ByteScout BarCode Generator SDK – C# – Generate Barcodes from Excel

How to generate barcodes from excel in C# and ByteScout Barcode SDK

The tutorial shows how to generate barcodes from excel in C#

On this page you will learn from code samples for programming in C#.Writing of the code to generate barcodes from excel in C# can be done by developers of any level using ByteScout Barcode SDK. ByteScout Barcode SDK is the robost SDK that generates high quality barcode images and pdf. Can generate all popular types of barcodes from QR Code, Code 39, Code 128, UPC, GS1, GS-128, PDF417, Datamatrix to more exotic barcode types. Fully customizable fonts, colors, print sizes. Includes special functions to ensure output quality, and tools for adding barcodes to new or existing pdf files and images. It can generate barcodes from excel in C#.

This rich sample source code in C# for ByteScout Barcode SDK includes the number of functions and options you should do calling the API to generate barcodes from excel. Just copy and paste the code into your C# application’s code and follow the instruction. Test C# sample code examples whether they respond your needs and requirements for the project.

ByteScout Barcode SDK free trial version is available on our website. C# and other programming languages are supported.

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

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

Program.cs
      
using System; using System.Data.OleDb; using Bytescout.BarCode; namespace GenerateFromDatabase { class Program { static void Main(string[] args) { // Create Barcode generator instance using (Barcode barcode = new Barcode()) { // Set barcode type to QR Code barcode.Symbology = SymbologyType.Code128; // Create database connection using (OleDbConnection connection = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=Book1.xlsx;Extended Properties='Excel 8.0;HDR=Yes'")) { connection.Open(); // Create SQL query using (OleDbCommand command = connection.CreateCommand()) { command.CommandText = "SELECT * FROM [Sheet1$]"; OleDbDataReader dataReader = command.ExecuteReader(); // Iterate values and generate barcode images int i = 0; while (dataReader.Read()) { barcode.Value = Convert.ToString(dataReader.GetValue(0)); barcode.SaveImage(barcode.Value + ".png"); i++; } } } } } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Barcode SDK Home Page

Explore ByteScout Barcode SDK Documentation

Explore Samples

Sign Up for ByteScout Barcode SDK 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 Barcode SDK Home Page

Explore ByteScout Barcode SDK Documentation

Explore Samples

Sign Up for ByteScout Barcode SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next