An easy to understand guide on how to generate barcodes from excel with barcode sdk in C# with this source code sample. Want to generate barcodes from excel with barcode sdk in your C# app? ByteScout Barcode Suite is designed for it. ByteScout Barcode Suite is the set that includes three different SDK products to generate barcodes, read barcodes and read and write spreadsheets: Barcode SDK, Barcode Reader SDK and Spreadsheet SDK.
The following code snippet for ByteScout Barcode Suite works best when you need to quickly generate barcodes from excel with barcode sdk in your C# application. Just copy and paste the code into your C# application’s code and follow the instructions. Applying C# application mostly includes various stages of the software development so even if the functionality works please test it with your data and the production environment.
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)
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++; } } } } } } }
60 Day Free Trial or Visit ByteScout Barcode Suite Home Page
Explore ByteScout Barcode Suite Documentation
Explore Samples
Sign Up for ByteScout Barcode Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
60 Day Free Trial or Visit ByteScout Barcode Suite Home Page
Explore ByteScout Barcode Suite Documentation
Explore Samples
Sign Up for ByteScout Barcode Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: