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#.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

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

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Spreadsheet SDK Home Page

Explore ByteScout Spreadsheet SDK Documentation

Explore Samples

Sign Up for ByteScout Spreadsheet SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Spreadsheet SDK Home Page

Explore ByteScout Spreadsheet SDK Documentation

Explore Samples

Sign Up for ByteScout Spreadsheet SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next