ByteScout Spreadsheet SDK - C# - Set Rich Text Formatting in Cell - ByteScout

ByteScout Spreadsheet SDK – C# – Set Rich Text Formatting in Cell

  • Home
  • /
  • Articles
  • /
  • ByteScout Spreadsheet SDK – C# – Set Rich Text Formatting in Cell

How to set rich text formatting in cell in C# using ByteScout Spreadsheet SDK

The tutorial below will demonstrate how to set rich text formatting in cell in C#

On this page you will learn from code samples for programming in C#.Writing of the code to set rich text formatting in cell in C# can be done by developers of any level using ByteScout Spreadsheet SDK. ByteScout Spreadsheet SDK is the SDK to create, read, modify and calculate spreadsheets. Formula calculations are supported, import and export to and from JSON, CSV, XML, databases, arrays. It can be used to set rich text formatting in cell using C#.

This rich sample source code in C# for ByteScout Spreadsheet SDK includes the number of functions and options you should do calling the API to set rich text formatting in cell. In order to implement the functionality, you should copy and paste this code for C# below into your code editor with your app, compile and run your application. Detailed tutorials and documentation are available along with installed ByteScout Spreadsheet SDK if you’d like to dive deeper into the topic and the details of the API.

ByteScout free trial version is available for download from our website. It includes all these programming tutorials along with source code samples.

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.Drawing; using System.Text; using Bytescout.Spreadsheet; using System.Diagnostics; using System.IO; namespace HelloWorld { class Program { static void Main(string[] args) { // Create new Spreadsheet Spreadsheet document = new Spreadsheet(); // Add new worksheet Worksheet worksheet = document.Workbook.Worksheets.Add("Sheet1"); // Apply rich text formatting worksheet.Cell(0, 0).ValueAsHTML = "<b><u>Bold Underline</u>, and <i>bold italic</i></b> text"; worksheet.Cell(1, 0).ValueAsHTML = "<font color=Blue>Blue</font>, <font color=Green>Green</font> and other <b><font face=Tahoma color=Red>co<font><font face=Tahoma color=Green>lo<font><font face=Tahoma color=Blue>rs<font></b> <font color=black><b>are</b> <u>available</u></font>"; // 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"); } } }

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