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: 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. It can get cell color in VB.NET.
This rich sample source code in VB.NET for ByteScout Spreadsheet SDK includes the number of functions and options you should do calling the API to get cell color. Just copy and paste the code into your VB.NET application’s code and follow the instruction. Enjoy writing a code with ready-to-use sample codes in VB.NET.
Trial version of ByteScout Spreadsheet SDK can be downloaded for free from our website. It also includes source code samples for VB.NET and other programming languages.
Imports Bytescout.Spreadsheet Imports System.IO 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() End Sub End Module