The documentation is designed to help you to implement the features on your side. ByteScout Spreadsheet SDK was made to help with validate cell if value is in range in C#. ByteScout Spreadsheet SDK is the SDK component for writing, reading, modifying and calculating Excel and CSV spreadsheets. Can calculate and reculculate formulas with Excel installed. You may import or export data to and from CSV, XML, JSON. Supports export to databases, arrays, streams.
You will save a lot of time on writing and testing code as you may just take the code below and use it in your application. To do validate cell if value is in range in your C# project or application you may simply copy & paste the code and then run your app! This basic programming language sample code for C# will do the whole work for you in implementing validate cell if value is in range in your app.
Our website provides free trial version of ByteScout Spreadsheet SDK. It comes along with all these source code samples with the goal to help you with your C# application implementation.
On-demand (REST Web API) version:
Web API (on-demand version)
On-premise offline SDK for Windows:
60 Day Free Trial (on-premise)
using System; using System.Collections.Generic; using System.Text; using System.Diagnostics; using Bytescout.Spreadsheet; using System.IO; namespace HelloWorld { class Program { static void Main(string[] args) { // Create new Spreadsheet Spreadsheet document = new Spreadsheet(); document.LoadFromFile("Data.xls"); // Get worksheet by name Worksheet worksheet = document.Workbook.Worksheets.ByName("Sample"); // Minimum age int RangeMin = 10; // Maximum age int RangeMax = 19; // Spellcheck words for (int i = 1; i < 8; i++) { // Set current cell Cell currentCell = worksheet.Cell(i, 1); // Check current cell if (System.Convert.ToInt32(currentCell.Value) < RangeMin || System.Convert.ToInt32(currentCell.Value) > RangeMax) { // Set fill pattern currentCell.FillPattern = Bytescout.Spreadsheet.Constants.PatternStyle.Solid; // Markup wrong cell by red color currentCell.FillPatternForeColor = System.Drawing.Color.Red; } } // delete output file if exists already if (File.Exists("Output.xls")){ File.Delete("Output.xls"); } // Save document document.SaveAs("Output.xls"); // Close Spreadsheet document.Close(); // open generated XLS document in default program Process.Start("Output.xls"); } } }
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: