The htmltabletoarray statement converts an HTML table into a text array.


This statement has five parameters:

table – text that contains the body of an HTML table. It should not contain the <table> and </table> tags.

array – field or variable that the output will be placed into.

rowsep – output row separator (will be carriage return if omitted).

colsep – output column separator (will be tab if omitted).

colsep – a comma-delimited list of the table columns to be included. For example "2,5,6,10" would import four out of 10 (or more) columns. If this parameter is missing then all columns will be included. If this parameter beginswith “+” or “+,” then each column will be preceded by the column number in parentheses, but it will be very slow.


This statement converts an HTML table into a text array. Here is a simple example:

local htable,results
htable = "<tr><td>Mary</td><td>Gold</td></tr>"+cr()+
htmltabletoarray htable,results,cr()," : "
message results

For clarity, this example builds the HTML table right in the program, but you would usually extract it from a larger HTML page. The result of this example will be:

Mary : Gold
Lucy : Silver
Ann : Bronze

See Also


10.0UpdatedCarried over from Panorama 6.0, but the ROWSEP and COLSEP parameters are now optional.