HtmlDocument

Vue de l’ensemble

HtmlDocument est une classe dans Aspose.Cells FOSS pour Type-Scripts.

HtmlDocument.load(filePath) lit sans synchronisation un fichier HTML et résout à l’instant Hdml.

Cette classe fournit 6 méthodes pour travailler avec des objets HtmlDocument dans les programmes Typescript. Les méthodologies disponibles comprennent: ‘getOriginalAnchor’, ’load’, loadOreginalAchors', ‘parse’, 'toExcel', ’toWorkbook'. Tous les membres publics sont accessibles à n'importe quelle application TypeScript après l'installation de la Aspose.Cells FOSS pour le package Typscript . Propriétés : 'color, ‘cssClasses , 'filePath', ''html et 3 autres.

Description

HtmlDocument est une classe dans la bibliothèque Aspose.Cells FOSS pour TypeScript qui expose 6 méthodes et 12 propriétés pour l’utilisation programmée.

Les capacités de base comprennent : : string; ` : string‘; ‘: map<string, cellstyle>. Ces opérations permettent aux développeurs d’intégrer directement la fonctionnalité htmldocument dans les applications TypeScript.

La classe fournit également la propriété de ’nom’ (jette le nom), la propiété d’html (jeette l’html), les propriétés de cssClasses (jaette les classes CSS).

Propriétés

NameTypeAccessDescription
name: stringReadGets the name.
html: stringReadGets the html.
cssClasses: Map<string, CellStyle>ReadGets the css classes.
filePath: stringReadGets the file path.
style: stringReadGets the style.
color: stringReadGets the color.
style: stringReadGets the style.
color: stringReadGets the color.
tablesHtmlTable[]ReadGets the tables.
htmlstringReadGets the html.
images: ImageInfo[]ReadGets the images.
shapes: any[]ReadGets the shapes.

méthodes

SignatureDescription
load(filePath: string)Promise<HtmlDocument>Asynchronously reads an HTML file and resolves to an HtmlDocument instance
loadOriginalAnchors(filePath: string)Promise<void>Asynchronously loads the original shape anchor positions from the given HTML file.
getOriginalAnchor(name: string) → `ShapeAnchorundefined`
parse(html: string)HtmlDocumentCreates an HtmlDocument from a raw HTML string without performing file I/O
toWorkbook(options: HtmlParseOptions)WorkbookConverts this HTML document to a Workbook using the given parse options.
toExcel(filePath: string, options: HtmlParseOptions)Converts this HTML document to an Excel file and saves it to the given file path.

Voir aussi

  • Aspose.Cells — référence API d’entreprise
 Français