ByteScout tutorials are designed to explain the code for both VB.NET beginners and advanced programmers. What is ByteScout Spreadsheet SDK? It is the SDK to create, read, modify and calculate spreadsheets. Formula calculations are supported, import and export to and from JSON, CSV, XML, databases, arrays. It can help you to read cell color in your VB.NET application.
This code snippet below for ByteScout Spreadsheet SDK works best when you need to quickly read cell color in your VB.NET application. This VB.NET sample code is all you need for your app. Just copy and paste the code, add references (if needs to) and you are all set! Test VB.NET sample code examples whether they respond your needs and requirements for the project.
ByteScout free trial version is available for download from our website. It includes all these programming tutorials along with source code samples.
Imports Bytescout.Spreadsheet Module Module1 Sub Main() ' Open existing XLS document Dim spreadSheet As New Spreadsheet() spreadSheet.LoadFromFile("input.xls") ' Take existing worksheet Dim sheet As Worksheet = spreadSheet.Worksheet(0) ' Take cell Dim cell As Cell = sheet.Cell(0, 0) ' Print back color of fill patter Console.WriteLine(cell.FillPatternBackColor.ToString()) ' Print fore color of fill pattern Console.WriteLine(cell.FillPatternForeColor.ToString()) ' Close spreadsheet spreadSheet.Close() Console.ReadKey() End Sub End Module