htmltablewidth(
htmltablewidth(
HTMLTABLE
)

The htmltablewidth( function calculates the width (number of columns) in an HTML table.

Parameters

This function has one parameter:

htmltable – the text containing the HTML table.

Description

This function calculates the width (number of columns) in an HTML table. It assumes that the table is a regular matrix (no colspan tags) and that all of the rows have the same number of columns as the top row in the table.

    htmltablewidth("<tr><td></td><td></td><td></td></tr>
        <tr><td></td><td></td><td></td></tr>
        <tr><td></td><td></td><td></td></tr>
        <tr><td></td><td></td><td></td></tr>
        <tr><td></td><td></td><td></td></tr>") ☞ 3

Use the htmltableheight( function to calculate the number of rows in a table.

Note: This function is equivalent to:

    tagcount(tagdata(thetable,"<tr","</tr>",1),"<td","</td>")

See Also

- HTML Export -- custom exports into an HTML file.
- htmlarraytable -- generates an HTML table from an arrray.
- htmldatamerge -- uses a template to generate HTML you want from a database.
- htmldatatable -- generates an HTML table from selected data in the current database.
- htmlextractimages -- extracts the image URLs from an HTML page.
- htmlextractlinks -- extracts the links from an HTML page.
- htmlformitemnames -- returns a list of form input elements (*INPUT* tags, etc.) within an HTML page.
- htmltablecell( -- extracts the data from a cell in an HTML table.
- htmltablecellexists( -- returns true if an HTML table contains the specified cell, false if it doesn't.
- htmltablecellraw( -- extracts the data from a cell in an HTML table (including tags, if any).
- htmltableheight( -- calculates the height (number of rows) in an HTML table.
- htmltablerow( -- extracts the data from a row in an HTML table.
- htmltablerowraw( -- extracts the raw data (including tags, if any) from a row in an HTML table.
- htmltabletoarray -- converts an HTML table into a text array.
- xtag( -- generates an HTML/XML tag.

History

Version | Status | Notes
10.0 | No Change | Carried over from Panorama 6.0.