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
| Name | Type | Access | Description |
|---|---|---|---|
name | : string | Read | Gets the name. |
html | : string | Read | Gets the html. |
cssClasses | : Map<string, CellStyle> | Read | Gets the css classes. |
filePath | : string | Read | Gets the file path. |
style | : string | Read | Gets the style. |
color | : string | Read | Gets the color. |
style | : string | Read | Gets the style. |
color | : string | Read | Gets the color. |
tables | HtmlTable[] | Read | Gets the tables. |
html | string | Read | Gets the html. |
images | : ImageInfo[] | Read | Gets the images. |
shapes | : any[] | Read | Gets the shapes. |
méthodes
| Signature | Description |
|---|---|
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) → `ShapeAnchor | undefined` |
parse(html: string) → HtmlDocument | Creates an HtmlDocument from a raw HTML string without performing file I/O |
toWorkbook(options: HtmlParseOptions) → Workbook | Converts 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