ByteScout Data Extraction Suite - VB.NET - Set cell alignment with spreadsheet sdk - ByteScout

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

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

How to set cell alignment with spreadsheet sdk in VB.NET and ByteScout Data Extraction Suite

How to write a robust code in VB.NET to set cell alignment with spreadsheet sdk with this step-by-step tutorial

Source code documentation samples give simple and easy method to install a needed feature into your application. Want to set cell alignment with spreadsheet sdk in your VB.NET app? ByteScout Data Extraction Suite is designed for it. ByteScout Data Extraction Suite is the set that includes 3 SDK products for data extraction from PDF, scans, images and from spreadsheets: PDF Extractor SDK, Data Extraction SDK, Barcode Reader SDK.

These VB.NET code samples for VB.NET guide developers to speed up coding of the application when using ByteScout Data Extraction Suite. Just copy and paste the code into your VB.NET application’s code and follow the instructions. Enjoy writing a code with ready-to-use sample codes in VB.NET.

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)

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

Explore ByteScout Data Extraction Suite Documentation

Explore Samples

Sign Up for ByteScout Data Extraction 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 Data Extraction Suite Home Page

Explore ByteScout Data Extraction Suite Documentation

Explore Samples

Sign Up for ByteScout Data Extraction Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next