htmlToSheet
On this page
Parse an HTML string containing a <table> into a WorkSheet.
Handles rowspan/colspan attributes and uses data-t/data-v
attributes (when present) for round-trip fidelity.
This is a lightweight table parser: it recognizes quoted attributes,
table cells, ordinary <br> line breaks, and semicolon-terminated HTML
character references without implementing full browser DOM parsing.
htmlToSheet(html: string, opts?: HTML2SheetOpts): WorkSheet
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
html | string | Yes | HTML string containing a table |
opts | HTML2SheetOpts | No |
Returns
A WorkSheet with the parsed table data