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

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.

Methods

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)ShapeAnchor | undefinedReturns the original anchor for the shape with the given name, or undefined if not found.
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.

See Also