Message-ID: <1806072704.8309.1711641525418.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_8308_551704229.1711641525418" ------=_Part_8308_551704229.1711641525418 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html CharacterRun

CharacterRun

Description

The=20 CharacterRun class allows you to set a font on a specified ran= ge of characters within a=20 ChartText object or a cell. To retu= rn a CharacterRun object, use=20 Cell.GetCharacters() or=20 ChartText.GetCharacters()= .=20
C#
=20
public sealed class CharacterRun
=20
=20
vb.net
=20
Public NotInheritable Class CharacterRun
= =20
=20

Examples

=20
C#
=20
          ExcelApplication xla =3D new ExcelApplication();
          Workbook wb =3D xla.Create();
          Worksheet ws =3D wb.Worksheets[0];
          Cell cellA1 =3D ws.Cells["A1"];
          cellA1.Value =3D "Test";
          CharacterRun charRun =3D cellA1.GetCharacters(0);
        
=20
vb.net
=20
          Dim xla As New ExcelApplication()
          Dim wb As Workbook =3D xla.Create()
          Dim ws As Worksheet =3D wb.Worksheets(0)
          Dim cellA1 As Cell =3D ws.Cells("A1")
          cellA1.Value =3D "Test"
          Dim charRun As CharacterRun =3D cellA1.GetCharacters(0)
        
=20

Properties

Name

Description

F= ont

Sets or returns the font for the CharacterRun.

Length

Returns the length - in characters - of the CharacterRun.

StartIndex

Returns the 0-based index of the first character= in the CharacterRun.

Methods

Name

Description

Clear()

Sets the font of the CharacterRun to the main font of the cell or ChartText object.

------=_Part_8308_551704229.1711641525418--