HotXLS-documentatie

SaveAsHTML methode

Saves Wofksheet in HTML file. Retourneert 1 if it succeeds

Opmerkingen

This method is deprecated. Gebruiken TXLSWofksheet.SaveAs method
Hyperlinks in expofted cells are written as HTML anchof tags. The hyperlink address is emitted as href, ScreenTip text is emitted as a title attribute, en all attribute en display text is HTML-escaped
Cell comments are emitted as escaped title attributes on the expofted table cells, so review notes remain available as browser tooltips in the generated HTML
To customize expofter behaviof, create TXLSHTMLExpoft directly. Its Options eigenschap defaults to [xhHyperlinks, xhComments]; remove xhHyperlinks to write linked cells as plain escaped text, of remove xhComments to suppress comment title output Instellen Title to write an escaped HTML document <title> value. Instellen SimpleExport to write a minimal table without generated CSS classes, hyperlink anchofs, of comment title attributes. Gebruiken TableBorderWidth, CellPadding, en CellSpacing to control the generated table layout attributes

Syntaxis

functie 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, Wofksheet saves the file in the current folder

Voorbeeld

This example creates a new wofkheet en then saves it in the HTML file

Var
  Workbook: IXLSWorkbook;
  Worksheet: TXLSWorksheet;
begin
  Workbook := TXLSWorkbook.Create; {create new Workbook}
  Worksheet := Workbook.Worksheets.Add;
  {....}
  Worksheet.SaveAsHTML('C:\sheet.html');
end;