HtmlDocument
Overview
HtmlDocument is a class in Aspose.Cells FOSS for Typescript.
HtmlDocument.load(filePath) asynchronously reads an HTML file and resolves to an HtmlDocument instance.
This class provides 6 methods for working with HtmlDocument objects in Typescript programs.
Available methods include: getOriginalAnchor, load, loadOriginalAnchors, parse, toExcel, toWorkbook.
All public members are accessible to any Typescript application after installing the Aspose.Cells FOSS for Typescript package.
Properties: color, cssClasses, filePath, html, images, name, and 3 more.
Description
HtmlDocument is a class in the Aspose.Cells FOSS library for TypeScript that exposes 6 methods and 12 properties for programmatic use.
Core capabilities include: : string; : string; : map<string, cellstyle>. These operations enable developers to integrate htmldocument functionality directly into TypeScript applications.
The class also provides the name property (gets the name), the html property (gets the html), the cssClasses property (gets the css classes).
Properties
| 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. |
Methods
| 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 | Returns the original anchor for the shape with the given name, or undefined if not found. |
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. |