FontSetting Class
Represents a range of characters within the cell text.
Inheritance Hierarchy

Namespace: Aspose.Cells
Assembly: Aspose.Cells (in Aspose.Cells.dll) Version: 19.10.0.0 (19.10)
Syntax
public class FontSetting

The FontSetting type exposes the following members.

Constructors
  NameDescription
Public methodFontSetting
Initializes a new instance of the FontSetting class
Properties
  NameDescription
Public propertyFont
Returns the font of this object.
Public propertyLength
Gets the length of the characters.
Public propertyStartIndex
Gets the start index of the characters.
Public propertyTextOptions
Returns the text options.
Public propertyType
Gets the type of text node.
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodSetWordArtStyle
Sets the preset WortArt style.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Examples
[C#]

//Instantiating a Workbook object
Workbook workbook = new Workbook();

//Adding a new worksheet to the Excel object
workbook.Worksheets.Add();

//Obtaining the reference of the newly added worksheet by passing its sheet index
Worksheet worksheet = workbook.Worksheets[0];

//Accessing the "A1" cell from the worksheet
Aspose.Cells.Cell cell = worksheet.Cells["A1"];

//Adding some value to the "A1" cell
cell.PutValue("Visit Aspose!");

//getting charactor
FontSetting charactor = cell.Characters(6, 7);

//Setting the font of selected characters to bold
charactor.Font.IsBold = true;

//Setting the font color of selected characters to blue
charactor.Font.Color = Color.Blue;

//Saving the Excel file
workbook.Save("D:\\book1.xls");

[VB.NET]

'Instantiating a Workbook object
Dim workbook As New Workbook()

'Adding a new worksheet to the Excel object
workbook.Worksheets.Add()

'Obtaining the reference of the newly added worksheet by passing its sheet index
Dim worksheet As Worksheet = workbook.Worksheets(0)

'Accessing the "A1" cell from the worksheet
Dim cell As Aspose.Cells.Cell = worksheet.Cells("A1")

'Adding some value to the "A1" cell
cell.PutValue("Visit Aspose!")

'getting charactor
Dim charactor As FontSetting = cell.Characters(6, 7)

'Setting the font of selected characters to bold
charactor.Font.IsBold = True

'Setting the font color of selected characters to blue
charactor.Font.Color = Color.Blue

'Saving the Excel file
workbook.Save("D:\book1.xls")
See Also