Xceed Workbooks for .NET v3.0 Documentation
Xceed.Workbooks.NET Assembly / Xceed.Workbooks.NET Namespace / Cell Class / FormatText Method
The Font that will be used to format the text.
The 0 based index that determines the starting point of the formatting.

The length of the formatted section of text.

If this value is 0, all of the text that follows the startingIndex will be formatted.



In This Topic
    FormatText Method (Cell)
    In This Topic
    Formats a specific section of the text with a selected Font.
    Syntax
    'Declaration
     
    
    Public Function FormatText( _
       ByVal newTextFont As Font, _
       ByVal startingIndex As Integer, _
       Optional ByVal length As Integer _
    ) As FormattedTextList
    'Usage
     
    
    Dim instance As Cell
    Dim newTextFont As Font
    Dim startingIndex As Integer
    Dim length As Integer
    Dim value As FormattedTextList
     
    value = instance.FormatText(newTextFont, startingIndex, length)

    Parameters

    newTextFont
    The Font that will be used to format the text.
    startingIndex
    The 0 based index that determines the starting point of the formatting.
    length

    The length of the formatted section of text.

    If this value is 0, all of the text that follows the startingIndex will be formatted.

    Remarks
    The selected part of the text will adopt the specified Font, while the rest of the text will stay the same.
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also