---
Product: Aspose.Cells
Platform: typescript
Page Type: reference
Canonical URL: https://reference.aspose.org/cells/typescript/htmldocument
---

# 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 declares 6 methods for HtmlDocument objects in TypeScript programs.
Available methods include: `getOriginalAnchor`, `load`, `loadOriginalAnchors`, `parse`, `toExcel`, `toWorkbook`.
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.

## 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 loads an HTML file and resolves to an HtmlDocument instance for further processing |
| `loadOriginalAnchors(filePath: string)` → `Promise<void>` | Calls loadOriginalAnchors(filePath) on this HtmlDocument instance. |
| `getOriginalAnchor(name: string)` → `ShapeAnchor \| undefined` | Calls getOriginalAnchor(name) on this HtmlDocument instance. |
| `parse(html: string)` → `HtmlDocument` | Creates an HtmlDocument from a raw HTML string without performing file I/O |
| `toWorkbook(options: HtmlParseOptions)` → `Workbook` | Calls toWorkbook(options) on this HtmlDocument instance. |
| `toExcel(filePath: string, options: HtmlParseOptions)` | Calls toExcel(filePath, options) on this HtmlDocument instance. |

## See Also

- [Aspose.Cells — Enterprise API Reference](https://reference.aspose.com/cells/)