Saves Worksheet in RTF file. Returns 1 if it succeeds
Remarques
Syntaxe
function SaveAsRTF(FileName: WideString): Integer;
function SaveAsRTF(Stream: TStream): Integer;
| FileName |
WideString. Une chaîne qui indique le nom du fichier à enregistrer. Vous pouvez inclure un chemin complet ; sinon, Worksheet enregistre le fichier dans le dossier courant |
| Stream |
TStream. Saves Worksheet to a stream specified in the Stream parameter |
Exemple
This example creates a new workheet and then saves it in the RTF file
Var
Book: IXLSWorkbook;
Sheet: TXLSWorksheet;
begin
Book := TXLSWorkbook.Create; {create new Workbook}
Sheet := Book.Worksheets.Add;
With Sheet.Cells[2,2] do
begin
Value := 'Text value';
Font.Size := 20;
Font.Color := clRed;
ColumnWidth := 50;
end;
Sheet.SaveAsRTF('sheet.rtf');
end;