TXLSXRichText 提供此 XLSX 功能的 API,并保留原始标识符 TXLSXCell.RichText 提供此 XLSX 功能的 API,并保留原始标识符
主要成员
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 ColorIsAuto | 另请参阅 |
| VertAlign | TXLSXWorkbook |
TXLSXWorksheet
var Rich: TXLSXRichText;
begin
Rich := TXLSXRichText.Create;
Rich.AddRunText('Quarterly ');
Rich.AddRunText('Report').Bold := True;
Sheet.Cells[1, 1].RichText := Rich;
end;TXLSXWorksheet