Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Excerpt

The CharacterRun class allows you to set a font on a specified range of characters within a ChartText object or a cell. To return a CharacterRun object, use Cell.GetCharacters() or ChartText.GetCharacters().

...

Signature
vb.net
vb.net
Public NotInheritable Class CharacterRun
Example
Code Block
csharp
csharp
titleC#
          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 Block
vb
vb
titlevb.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)
        

Properties

Name

Description

Font

Excerpt Include
CharacterRun.Font
CharacterRun.Font
nopaneltrue

Length

Excerpt Include
CharacterRun.Length
CharacterRun.Length
nopaneltrue

StartIndex

Excerpt Include
CharacterRun.StartIndex
CharacterRun.StartIndex
nopaneltrue

...