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.

Try ByteScout Spreadsheet SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

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

Try ByteScout Spreadsheet SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

VIDEO

ON-PREMISE VERSION INFORMATION

Get 60 Day Free Trial or Visit ByteScout Spreadsheet SDK Home Page

Explore ByteScout Spreadsheet SDK Documentation

Get ByteScout Spreadsheet SDK Free Training

WEB API

Get Your Free API Key

Explore Web API Documentation

Tutorials:

prev
next