Barcode for .NET Suite
How to Generate Barcodes in Excel using C#
How to print, embed various barcode images in Excel worksheets using Visual C#
Excel Barcode Integration > Barcode in C#
KA.Barcode for .NET Suite is an all-in-one barcode generator control SDK, which can help developers easily generate, print 1D, matrix barcode symbols in various applications and projects, such as Microsoft Excel Workbook, Microsoft Word Document, ASP.NET web application, Windows Forms, C# & VB.NET Class & Console applications, etc.
If you just want to create a barcode image in Excel without programming or barcode fonts, you can view the tutorial for KA.Barcode for Excel pluin here.
Compatibility & Requirements

Development Environments

  • For Visual studio 2005/2008/2010
  • Visual C#, Visual Basic.NET, Borland Delphi and many more

OS Compatibility:

  • Operating Systems with Microsoft .NET Framework 2.0 or above
Test Environment:
  • Microsoft Windows XP
  • Microsoft Visual Studio 2008
  • Visual C#.NET
  • Microsoft Office Excel 2007
Download Barcode Generator SDK Demo for Free
Start now to download KeepAutomation .NET Barcode Generator Control Library trial version!
Install & Add Reference
  1. 1.
    Unzip the file to find "KeepAutomation.Barcode.Windows.dll" & "KeepAutomation.Barcode.Web.dll"
  2. 2.
    Click "Project" and select "Add Reference..."
  3. 3.
    In the popup window, please click "Browse" to locate either one of the above two dlls and then click "OK"
  4. 4.
    Now the control has been added to your project reference successfully
How to Generate Barcodes in Excel Using C#
  1. 1.
    Create a new project by selecting Excel Workbook
  2. 2.
    In the left-side Toolbox, drag a PictureBox into the created Excel workbook
  3. 3.
    Double click the picture box, and you will get a form1 for programming
  4. 4.
    Copy the Visual C# sample code below to insert a barcode in the Excel workbook
  5. 5.
    Debug the project and you will see the barcode image created in the Excel
  6. 6.
    Note: Please make sure you have installed the MS Excel version supported by your VS
private void pictureBox1_Click(object sender, EventArgs e)
{
BarCode barcode = new BarCode();

barcode.CodeToEncode = "QRCode123";
barcode.Symbology = KeepAutomation.Barcode.Symbology.QRCode;
barcode.QRCodeDataMode = QRCodeDataMode.Auto;
barcode.QRCodeVersion = QRCodeVersion.V5;
barcode.BarcodeUnit = BarcodeUnit.Pixel;
barcode.DPI = 72;
barcode.X = 2;
barcode.Y = 2;
barcode.LeftMargin =8;
barcode.RightMargin = 8;
barcode.TopMargin =8;
barcode.BottomMargin = 8;

Bitmap bmp = barcode.drawBarcode();

this.pictureBox1.Image = bmp;
this.pictureBox1.Refresh();

}