TXLSXRichText armazena trechos de texto formatado para TXLSXCell.RichText e texto formatado de comentários na fachada XLSX
Declarações
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;
Membros principais
| AddRun and AddRunText | Anexa um trecho vazio ou um trecho com texto inicial |
| PlainText | Retorna o texto concatenado sem informações de estilo |
| Name, Size, Bold, Italic and Strikethrough | Família, tamanho e atributos básicos da fonte para um trecho |
| Underline, Color and ColorIsAuto | Opções de sublinhado e cor do trecho |
| VertAlign | Alinhamento vertical de linha de base, subscrito ou sobrescrito |
Exemplo
var Rich: TXLSXRichText;
begin
Rich := TXLSXRichText.Create;
Rich.AddRunText('Quarterly ');
Rich.AddRunText('Report').Bold := True;
Sheet.Cells[1, 1].RichText := Rich;
end;Veja também