ByteScout Spreadsheet SDK - C# - Read Cell Color - ByteScout

ByteScout Spreadsheet SDK – C# – Read Cell Color

  • Home
  • /
  • Articles
  • /
  • ByteScout Spreadsheet SDK – C# – Read Cell Color

How to read cell color in C# and ByteScout Spreadsheet SDK

This code in C# shows how to read cell color with this how to tutorial

Sample source code below will show you how to cope with a difficult task like read cell color in C#. ByteScout Spreadsheet SDK can read cell color. It can be used from C#. 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.

The SDK samples like this one below explain how to quickly make your application do read cell color in C# with the help of ByteScout Spreadsheet SDK. In order to implement the functionality, you should copy and paste this code for C# below into your code editor with your app, compile and run your application. This basic programming language sample code for C# will do the whole work for you to read cell color.

You can download free trial version of ByteScout Spreadsheet SDK from our website to see and try many others source code samples for C#.

Try ByteScout Spreadsheet SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

Program.cs
      
using System; using System.Collections.Generic; using System.Text; using Bytescout.Spreadsheet; namespace GetCellColor { class Program { static void Main(string[] args) { // Open existing XLS document Spreadsheet spreadSheet = new Spreadsheet(); spreadSheet.LoadFromFile("input.xls"); // Take existing worksheet Worksheet sheet = spreadSheet.Worksheet(0); // Take cell Cell 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(); } } }

Try ByteScout Spreadsheet SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

VIDEO

ON-PREMISE VERSION INFORMATION

Get 60 Day Free Trial or Visit ByteScout Spreadsheet SDK Home Page

Explore ByteScout Spreadsheet SDK Documentation

Get ByteScout Spreadsheet SDK Free Training

WEB API

Get Your Free API Key

Explore Web API Documentation

Tutorials:

prev
next