ByteScout Data Extraction Suite - C# - Use special cells with spreadsheet sdk - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

ByteScout Data Extraction Suite – C# – Use special cells with spreadsheet sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Data Extraction Suite – C# – Use special cells with spreadsheet sdk

How to use special cells with spreadsheet sdk in C# with ByteScout Data Extraction Suite

Learn to code in C# to use special cells with spreadsheet sdk with this step-by-step tutorial

We made thousands of pre-made source code pieces for easy implementation in your own programming projects. Want to use special cells with spreadsheet sdk in your C# app? ByteScout Data Extraction Suite is designed for it. ByteScout Data Extraction Suite is the set that includes 3 SDK products for data extraction from PDF, scans, images and from spreadsheets: PDF Extractor SDK, Data Extraction SDK, Barcode Reader SDK.

This prolific sample source code in C# for ByteScout Data Extraction Suite contains various functions and other necessary options you should do calling the API to use special cells with spreadsheet sdk. Simply copy and paste in your C# project or application you and then run your app! Use of ByteScout Data Extraction Suite in C# is also described in the documentation included along with the product.

The trial version of ByteScout Data Extraction Suite can be downloaded for free from our website. It also includes source code samples for C# and other programming languages.

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 System.Diagnostics; using System.IO; using Bytescout.Spreadsheet; using Bytescout.Spreadsheet.Charts; using Bytescout.Spreadsheet.Constants; using System.Drawing; namespace CSharp { class Program { static void Main(string[] args) { try { // create new Spreadsheet object Spreadsheet spreadsheet = new Spreadsheet(); // add new worksheet Worksheet sheet = spreadsheet.Workbook.Worksheets.Add("Sample"); // add a constants for (int i = 1; i < 8; i++) { sheet[i, 1].Value = i; } // add a formulas sheet.Range("D2:D8").Formula = "=RAND()*10"; //Select the cells containing constants Range range1 = sheet.Range("A1:E9").SpecialCells(XlCellType.Constants, null); range1.FillPattern = PatternStyle.Solid; range1.FillPatternForeColor = Color.Yellow; //Select the cells containing formulas Range range2 = sheet.Range("A1:E9").SpecialCells(XlCellType.Formulas, null); range2.FillPattern = PatternStyle.Solid; range2.FillPatternForeColor = Color.Cyan; if (File.Exists("Output.xls")) { File.Delete("Output.xls"); } // Save it as XLS spreadsheet.SaveAs("Output.xls"); // close the document spreadsheet.Close(); // open output XLS Process.Start("Output.xls"); } catch (Exception e) { Console.WriteLine("CAN NOT EXECUTE: " + e.ToString()); Console.WriteLine("\nPress any key to exit"); Console.ReadKey(); } } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Data Extraction Suite Home Page

Explore ByteScout Data Extraction Suite Documentation

Explore Samples

Sign Up for ByteScout Data Extraction Suite 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 Data Extraction Suite Home Page

Explore ByteScout Data Extraction Suite Documentation

Explore Samples

Sign Up for ByteScout Data Extraction Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next