HotXLS-documentatie

SaveAsHTML methode

Slaat het werkblad op in een HTML-bestand. Retourneert 1 bij succes

Opmerkingen

This method is deprecated. Gebruiken TXLSWorksheet.SaveAs method
Hyperlinks in geƫxporteerde cellen worden als HTML-anchortags weggeschreven. Het hyperlinkadres wordt uitgevoerd als 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 attributen op de geƫxporteerde tabelcellen, zodat beoordelingsnotities in de gegenereerde HTML als browsertooltips beschikbaar blijven
To customize exporter behavior, create TXLSHTMLExport 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 anchors, of comment title attributes. Gebruiken TableBorderWidth, CellPadding, en CellSpacing to control the generated table layout attributes

Syntaxis

functie SaveAsHTML(FileName: WideString): Integer;
FileName WideString. Een tekenreeks die de naam van het op te slaan bestand aangeeft. Je kunt een volledig pad opnemen; doe je dat niet, dan slaat Worksheet het bestand op in de huidige map

Voorbeeld

Dit voorbeeld maakt een nieuw werkblad aan en slaat het vervolgens op in het HTML-bestand

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