NativeExcel suite v1.x

SaveAsRTF method

Saves workbook in RTF file. Returns 1 if it succeeds.

Remarks

This method is deprecated. Use IXLSWorkbook.SaveAs method.

Syntax

function SaveAsRTF(FileName: WideString): integer;
function SaveAsRTF(Stream: TStream): integer;
FileNameWideString. A string that indicates the name of the file to be saved. You can include a full path; if you don't, workbook saves the file in the current folder.
StreamTStream. Saves workbook to a stream specified in the Stream parameter.

Example

This example creates a new workbook with two worksheets and then saves the workbook in RTF file.
Var
  WorkBook: IXLSWorkBook;
begin
  WorkBook := TXLSWorkBook.Create; {create new workbook}
  WorkBook.Worksheets.Add; 
  {....}
  WorkBook.Worksheets.Add; 
  {....}
  WorkBook.SaveAsRTF('C:\book.rtf');
end;
Copyright © NikaSoft 2004-2010