Skip to content

api/html Functions

Functions exported from src/api/html.ts

htmlToSheet

function htmlToSheet(html: string): WorkSheet

Parameters

NameTypeDescription
htmlstringHTML string containing a table

Returns

WorkSheet

A WorkSheet with the parsed table data


sheetToHtml

function sheetToHtml(ws: WorkSheet, opts?: Sheet2HTMLOpts): string

Parameters

NameTypeDescription
wsWorkSheetThe worksheet to convert
opts (optional)Sheet2HTMLOptsOptional HTML generation options (header, footer, id, editable, sanitizeLinks)

Returns

string

The HTML string representation of the worksheet