Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{description}
{excerpt}The [CharacterRun|CharacterRun] class allows you to set a font on a specified range of characters within a [ChartText|ChartText] object or a cell. To return a {{CharacterRun}} object, use [Cell.GetCharacters()|Cell.GetCharacters] or [ChartText.GetCharacters()|ChartText.GetCharacters].{excerpt}
{signature:C#}
 public sealed class CharacterRun
{signature}{signature:vb.net}
Public NotInheritable Class CharacterRun
{signature}
{example}{code:csharp|title=C#}

          ExcelApplication xla = new ExcelApplication();
          Workbook wb = xla.Create();
          Worksheet ws = wb.Worksheets[0];
          Cell cellA1 = ws.Cells["A1"];
          cellA1.Value = "Test";
          CharacterRun charRun = cellA1.GetCharacters(0);
        {code}
{code:vb.net|title=vb.net}

          Dim xla As New ExcelApplication()
          Dim wb As Workbook = xla.Create()
          Dim ws As Worksheet = wb.Worksheets(0)
          Dim cellA1 As Cell = ws.Cells("A1")
          cellA1.Value = "Test"
          Dim charRun As CharacterRun = cellA1.GetCharacters(0)
        {code}

{example}
{properties}
||Name||Description||
|[Font|CharacterRun.Font]|{excerpt-include:CharacterRun.Font|nopanel=true}|
|[Length|CharacterRun.Length]|{excerpt-include:CharacterRun.Length|nopanel=true}|
|[StartIndex|CharacterRun.StartIndex]|{excerpt-include:CharacterRun.StartIndex|nopanel=true}|
{methods}
||Name||Description||
|[Clear()|CharacterRun.Clear()]|{excerpt-include:CharacterRun.Clear()|nopanel=true}|
{scrollbar}