Documentazione HotXLS

SaveAsHTML metodo

Saves Worksheet in HTML file. Restituisce 1 if it succeeds

Osservazioni

This method is deprecated. Usa TXLSWorksheet.SaveAs method
Hyperlinks in exported cells are written as HTML anchor tags. The hyperlink address is emitted as href, ScreenTip text is emitted as a title attribute, e all attribute e display text is HTML-escaped
Cell comments are emitted as escaped title attributes on the exported table cells, so review notes remain available as browser tooltips in the generated HTML
To customize exporter behavior, create TXLSHTMLExport directly. Its Options proprietà defaults to [xhHyperlinks, xhComments]; remove xhHyperlinks to write linked cells as plain escaped text, o remove xhComments to suppress comment title output Imposta Title to write an escaped HTML document <title> value. Imposta SimpleExport to write a minimal table without generated CSS classes, hyperlink anchors, o comment title attributes. Usa TableBorderWidth, CellPadding, e CellSpacing to control the generated table layout attributes

Sintassi

funzione 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, Worksheet saves the file in the current folder

Esempio

This example creates a new workheet e 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;