TXLSXRichText と TXLSXRichTextRun クラス - HotXLS リファレンス

用のスタイル付きテキストランを保存します

TXLSXRichText 用のスタイル付きテキストランを保存します TXLSXCell.RichText 用のスタイル付きテキストランを保存します

主なメンバー

type
  TXLSXRichText = class
    function AddRun: TXLSXRichTextRun;
    function AddRunText(const AText: WideString): TXLSXRichTextRun;
    procedure Clear;
    function PlainText: WideString;
    property RunCount: Integer;
    property Runs[Index: Integer]: TXLSXRichTextRun;
  end;

  TXLSXRichTextRun = class
    property Text, Name: WideString;
    property Size: Double;
    property Bold, Italic, Strikethrough, ColorIsAuto: Boolean;
    property Underline: TXLSXUnderline;
    property Color: LongWord;
    property VertAlign: TXLSXFontVertAlign;
  end;

主なメンバー

AddRun and AddRunText主なメンバー
PlainText空のランまたは初期テキスト付きランを追加
Name, Size, Bold, Italic and Strikethrough空のランまたは初期テキスト付きランを追加
Underline, Color and ColorIsAutoAddRun and AddRunText
VertAlignスタイルなしの連結テキストを返す

スタイルなしの連結テキストを返す

var Rich: TXLSXRichText;
begin
  Rich := TXLSXRichText.Create;
  Rich.AddRunText('Quarterly ');
  Rich.AddRunText('Report').Bold := True;
  Sheet.Cells[1, 1].RichText := Rich;
end;

Underline, Color and ColorIsAuto