ByteScout Spreadsheet SDK - VB.NET - Validate Cell if Value is in Range - ByteScout

ByteScout Spreadsheet SDK – VB.NET – Validate Cell if Value is in Range

  • Home
  • /
  • Articles
  • /
  • ByteScout Spreadsheet SDK – VB.NET – Validate Cell if Value is in Range

validate cell if value is in range in VB.NET with ByteScout Spreadsheet SDK

validate cell if value is in range in VB.NET

The documentation is designed to help you to implement the features on your side. ByteScout Spreadsheet SDK was made to help with validate cell if value is in range in VB.NET. ByteScout Spreadsheet SDK is the library (SDK) that is capable of writing, reading, modifying and calculating Excel and CSV spreadsheets. Most popular formulas can be calculated and reculculated with Excel installed. You may import or export data to and from CSV, XML, JSON as well as to and from databases, arrays.

You will save a lot of time on writing and testing code as you may just take the code below and use it in your application. To do validate cell if value is in range in your VB.NET project or application you may simply copy & paste the code and then run your app! This basic programming language sample code for VB.NET will do the whole work for you in implementing validate cell if value is in range in your app.

ByteScout Spreadsheet SDK free trial version is available for download from our website. Free trial also includes programming tutorials along with source code samples.

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() ' Create new Spreadsheet Dim document As Spreadsheet = New Spreadsheet() document.LoadFromFile("Data.xls") ' Get worksheet by name Dim worksheet As Worksheet = document.Workbook.Worksheets.ByName("Sample") ' Minimum age Dim RangeMin As Integer = 10 ' Maximum age Dim RangeMax As Integer = 19 ' Spellcheck words For i As Integer = 1 To 7 ' Set current cell Dim currentCell As Cell = worksheet.Cell(i, 1) ' Check current cell If System.Convert.ToInt32(currentCell.Value) < RangeMin Or System.Convert.ToInt32(currentCell.Value) > RangeMax 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 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 Spreadsheet SDK Home Page

Explore ByteScout Spreadsheet SDK Documentation

Explore Samples

Sign Up for ByteScout Spreadsheet SDK 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 Spreadsheet SDK Home Page

Explore ByteScout Spreadsheet SDK Documentation

Explore Samples

Sign Up for ByteScout Spreadsheet SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next