Use special cells with spreadsheet sdk is simple to apply in C# if you use these source codes below. What is ByteScout Barcode Suite? It is the bundle that privides 3 SDK products to generate barcodes (Barcode SDK), read barcodes (Barcode Reaer SDK) and read and write spreadsheets (Spreadsheet SDK). It can help you to use special cells with spreadsheet sdk in your C# application.
Want to save time? You will save a lot of time on writing and testing code as you may just take the C# code from ByteScout Barcode Suite for use special cells with spreadsheet sdk below and use it in your application. Simply copy and paste in your C# project or application you and then run your app! Complete and detailed tutorials and documentation are available along with installed ByteScout Barcode Suite if you’d like to learn more about the topic and the details of the API.
If you want to try other source code samples then the free trial version of ByteScout Barcode Suite is available for download from our website. Just 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)
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(); } } } }
60 Day Free Trial or Visit ByteScout Barcode Suite Home Page
Explore ByteScout Barcode Suite Documentation
Explore Samples
Sign Up for ByteScout Barcode Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
60 Day Free Trial or Visit ByteScout Barcode Suite Home Page
Explore ByteScout Barcode Suite Documentation
Explore Samples
Sign Up for ByteScout Barcode Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: