Every ByteScout tool contains example VB.NET source codes that you can find here or in the folder with installed ByteScout product. ByteScout Spreadsheet SDK helps with validate data in cell and mark wrong with color in VB.NET. ByteScout Spreadsheet SDK is the SDK that can write and read, modify and calculate Excel and CSV spreadsheets. Most popular formulas are supported. You may import or export data to and from CSV, XML, JSON as well as to and from databases, arrays.
VB.NET, code samples for VB.NET, developers help to speed up the application development and writing a code when using ByteScout Spreadsheet SDK. To do validate data in cell and mark wrong with color in your VB.NET project or application you may simply copy & paste the code and then run your app! Use of ByteScout Spreadsheet SDK in VB.NET is also explained in the documentation included along with the product.
On our website you may get trial version of ByteScout Spreadsheet SDK for free. Source code samples are included to help you with your VB.NET application.
Imports Bytescout.Spreadsheet Imports System.IO Module Module1 Sub Main() ' 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") ' Spellcheck words For i As Integer = 0 To 4 ' Set current cell Dim currentCell As Cell = worksheet.Cell(0, i) ' Spellcheck current cell If currentCell.Value = "Simpsan" Then ' Set fill pattern currentCell.FillPattern = Bytescout.Spreadsheet.Constants.PatternStyle.Solid ' Markup wrong word 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