Cell.Characters

Cell.Characters method

Returns a Characters object that represents a range of characters within the cell text.

public FontSetting Characters(int startIndex, int length)
ParameterTypeDescription
startIndexInt32The index of the start of the character.
lengthInt32The number of characters.

Return Value

Characters object.

Remarks

This method only works on cell with string value.

Examples

using System;
using Aspose.Cells;
using System.Drawing;

namespace AsposeCellsExamples
{
    public class CellMethodCharactersWithInt32Int32Demo
    {
        public static void Run()
        {
            Workbook workbook = new Workbook();
            Cells cells = workbook.Worksheets[0].Cells;
            
            cells["A1"].PutValue("Helloworld");
            cells["A1"].Characters(5, 5).Font.IsBold = true;
            cells["A1"].Characters(5, 5).Font.Color = Color.Blue;
            
            workbook.Save("output.xlsx");
        }
    }
}

See Also