Saves Workbook in RTF file. Returns 1 if it succeeds.
Remarks
Syntax
function SaveAsRTF(FileName: WideString): Integer;
function SaveAsRTF(Stream: TStream): Integer;
FileName |
WideString. 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. |
Stream |
TStream. Saves Workbook to a stream specified in the Stream parameter. |
Example
This example opens Workbook book.xls and then saves it in RTF file.
Var
Book: IXLSWorkbook;
begin
Book := TXLSWorkbook.Create;
if Book.Open('book.xls') = 1 then
Book.SaveAsRTF('book.rtf');
end;
This example creates a new Workbook with two Worksheets and then saves the Workbook in RTF file.