HtmlTable

Vue de l’ensemble

HtmlTable est une classe dans Aspose.Cells FOSS pour Typescript.

HtmlTable.parse(html, cssClasses) parse une seule ligne de table HTML dans un objet Hdml Table, en appliquant des filtres de classe CSS facultatifs.

Cette classe fournit 10 méthodes pour travailler avec des objets HtmlTable dans les programmes de type. Les méthodologies disponibles comprennent: addHeader, adRow , ‘constructor;getCellStyle; mergeTables : parse et parseAll . setCssClasses à HTML, à WordShot. Tous les membres publics sont accessibles à toute application TypeScript après l’installation du package TypeScope Aspose.Cells FOSS. Propriétés : caption., colWidths.

Description

HtmlTable est une classe dans la bibliothèque Aspose.Cells FOSS pour TypeScript qui expose 9 méthodes et 14 propriétés pour l’utilisation programmée.

Les fonctionnalités de base comprennent : : nombre; : nombre' ;. ces opérations permettent aux développeurs d’intégrer directement la fonctionalité du tableau html dans les applications TypeScript.

La classe fournit également la propriété des « colls » (qui prend les cols), la « compte » propriétés (qu’il prend le nombre), l’« hauteur » propiété (que prend la haute).

Les instances sont créées à travers un constructeur unique qui initialisera l’objet avec des valeurs par défaut.

Propriétés

NameTypeAccessDescription
cols: numberReadGets the cols.
count: numberReadGets the count.
height: numberReadGets the height.
caption`stringundefined`Read
headersstring[]ReadGets the headers.
rowsstring[][]ReadGets the rows.
colWidthsnumber[]ReadGets the col widths.
rowHeightsnumber[]ReadGets the row heights.
hiddenRowsboolean[]ReadGets the hidden rows.
picturesPictureInfo[]ReadGets the pictures.
style: stringReadGets the style.
color: stringReadGets the color.

méthodes

SignatureDescription
constructor(caption: string)Creates a new HtmlTable with the specified caption text.
setCssClasses(classes: Map<string, CellStyle>)Sets the css classes value.
getCellStyle(row: number, col: number) → `CellStyleundefined`
addHeader(header: string)Adds a column header string to the table.
addRow(row: string[])Appends an array of cell values as a new row to the table.
parseAll(html: string, cssClasses: Map<string, CellStyle>)HtmlTable[]Parses all HTML tables in an HTML string and returns them as an array of HtmlTable objects.
toWorksheet(worksheet: Worksheet, options: HtmlParseOptions)Writes this HtmlTable’s data into the specified Worksheet using the given parse options.
parse(html: string, cssClasses: Map<string, CellStyle>)HtmlTableParses a single HTML table into an HtmlTable object, which can then be written to a worksheet via toWorksheet
mergeTables(tables: HtmlTable[])HtmlTableCombines multiple HtmlTable instances into a single table, preserving rows and columns
toHtml(options: HtmlSaveOptions)stringSerializes the HtmlTable to an HTML string using the specified save options.

Voir aussi

  • Aspose.Cells — référence API d’entreprise
 Français