HotXLS Delphi Excel Read Write Library / Component Developers Guide loslab Inc.

SaveAsHTML method

Saves Workbook in HTML file. Returns 1 if it succeeds.

Remarks

This method is deprecated. Use IXLSWorkbook.SaveAs method.

Syntax

function SaveAsHTML(FileName: WideString): 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.

Example

This example creates a new Workbook with two Worksheets and then saves the Workbook in HTML file.

Var
  Workbook: IXLSWorkbook;
begin
  Workbook := TXLSWorkbook.Create; {create new Workbook}
  Workbook.Worksheets.Add; 
  {....}
  Workbook.Worksheets.Add; 
  {....}
  Workbook.SaveAsHTML('C:\book.html');
end;
Copyright©2007-2019 loslab.com