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

ByteScout Spreadsheet SDK – C# – Get Cell Color

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

How to get cell color in C# with ByteScout Spreadsheet SDK

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

We made thousands of pre-made source code pieces for easy implementation in your own programming projects. What is ByteScout Spreadsheet SDK? It 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. It can help you to get cell color in your C# application.

The SDK samples like this one below explain how to quickly make your application do get cell color in C# with the help of ByteScout Spreadsheet SDK. In your C# project or application you may simply copy & paste the code and then run your app! Test C# sample code examples whether they respond your needs and requirements for the project.

Free trial version of ByteScout Spreadsheet SDK is available for download from our website. Get it to try other source code samples for C#.

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

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(); } } }

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



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

Explore ByteScout Spreadsheet SDK Documentation

Get ByteScout Spreadsheet SDK Free Training


Get Your Free API Key

Explore Web API Documentation