ByteScout Barcode Suite - VB.NET - Set cell alignment with spreadsheet sdk - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

ByteScout Barcode Suite – VB.NET – Set cell alignment with spreadsheet sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Barcode Suite – VB.NET – Set cell alignment with spreadsheet sdk

How to set cell alignment with spreadsheet sdk in VB.NET using ByteScout Barcode Suite

If you want to learn more then this tutorial will show how to set cell alignment with spreadsheet sdk in VB.NET

An easy to understand sample source code to learn how to set cell alignment with spreadsheet sdk in VB.NET ByteScout Barcode Suite: 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. It can set cell alignment with spreadsheet sdk in VB.NET.

These VB.NET code samples for VB.NET guide developers to speed up coding of the application when using ByteScout Barcode Suite. IF you want to implement the functionality, just copy and paste this code for VB.NET below into your code editor with your app, compile and run your application. This basic programming language sample code for VB.NET will do the whole work for you to set cell alignment with spreadsheet sdk.

You can download free trial version of ByteScout Barcode Suite from our website to see and try many others source code samples for VB.NET.

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 Bytescout.Spreadsheet Imports System.IO Imports System.Diagnostics Module Module1 Sub Main() ' Open Spreadsheet Dim document As New Spreadsheet() ' Add new worksheet Dim worksheet As Worksheet = document.Workbook.Worksheets.Add("AlignmentDemo") ' Set Values worksheet.Cell("A1").Value = "Name" ' setting centered alignment for the cell worksheet.Cell("A1").AlignmentHorizontal = Bytescout.Spreadsheet.Constants.AlignmentHorizontal.Centered worksheet.Cell("B1").Value = "Full Name" ' setting centered alignment for the cell worksheet.Cell("B1").AlignmentHorizontal = Bytescout.Spreadsheet.Constants.AlignmentHorizontal.Centered worksheet.Cell("A2").Value = "Homer" ' setting justifiedalignment for the cell worksheet.Cell("A2").AlignmentHorizontal = Bytescout.Spreadsheet.Constants.AlignmentHorizontal.Right worksheet.Cell("B2").Value = "Homer Jay Simpson" ' setting justified alignment for the cell worksheet.Cell("B2").AlignmentHorizontal = Bytescout.Spreadsheet.Constants.AlignmentHorizontal.Right ' set columns width worksheet.Columns(0).Width = 300 ' A column worksheet.Columns(1).Width = 400 ' B column ' remove output file if already exists If File.Exists("Output.xls") Then File.Delete("Output.xls") End If ' Save document document.SaveAs("Output.xls") ' Close Spreadsheet document.Close() ' open in default spreadsheets viewer/editor Process.Start("Output.xls") End Sub End Module

ON-PREMISE OFFLINE SDK

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

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 Suite Home Page

Explore ByteScout Barcode Suite Documentation

Explore Samples

Sign Up for ByteScout Barcode Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next