ByteScout Barcode Suite - VB.NET - Validate cells with dates 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 – Validate cells with dates with spreadsheet sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Barcode Suite – VB.NET – Validate cells with dates with spreadsheet sdk

validate cells with dates with spreadsheet sdk in VB.NET using ByteScout Barcode Suite

Learn to code in VB.NET to make validate cells with dates with spreadsheet sdk with this simple How-To tutorial

Every ByteScout tool includes sampleVB.NET source codes that you can find here or in the folder with installed ByteScout product. Validate cells with dates with spreadsheet sdk in VB.NET can be applied with ByteScout Barcode Suite. ByteScout Barcode Suite is the bundle that privides 3 SDK products to generate barcodes (Barcode SDK), read barcodes (Barcode Reaer SDK) and read and write spreadsheets (Spreadsheet SDK).

Want to speed up the application development? Then this VB.NET, code samples for VB.NET, developers help to speed up the application development and writing a code when using ByteScout Barcode Suite. To use validate cells with dates with spreadsheet sdk in your VB.NET project or application just copy & paste the code and then run your app! Enjoy writing a code with ready-to-use sample VB.NET codes to add validate cells with dates with spreadsheet sdk functions using ByteScout Barcode Suite in VB.NET.

Visit our website to get a free trial version of ByteScout Barcode Suite. Free trial contains many of source code samples to help you with your VB.NET project.

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 Module Module1 Sub Main() ' in this sample we scan cells with ages data for people ' then mark all dates where age is between 10 and 19 years and mark these cells with red color ' Create new Spreadsheet Dim document As New Spreadsheet() document.LoadFromFile("Data.xls") ' Get worksheet by name Dim worksheet As Worksheet = document.Workbook.Worksheets.ByName("Sample") ' Years range Dim RangeMin As Integer = 10 Dim RangeMax As Integer = 19 ' Minimum age Dim YearMin As DateTime = DateTime.Now ' Maximum age Dim YearMax As DateTime = DateTime.Now ' Minimum year YearMax = YearMax.AddYears(-RangeMin) ' Maximum year YearMin = YearMin.AddYears(-RangeMax) ' Check dates For i As Integer = 1 To 7 ' Set current cell Dim currentCell As Cell = worksheet.Cell(i, 1) Dim dateBirth As DateTime = currentCell.ValueAsDateTime ' Check current cell If dateBirth < YearMin Or dateBirth > YearMax Then ' Set fill pattern currentCell.FillPattern = Bytescout.Spreadsheet.Constants.PatternStyle.Solid ' Markup wrong cell by red color currentCell.FillPatternForeColor = System.Drawing.Color.Red End If ' Set cell format currentCell.NumberFormatString = "dd.mm.yyyy" Next ' 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