Documentation for RCHGetTableCell() function


Description

    Extracts a specified table cell from a web page.

Syntax

    =RCHGetTableCell( URL, Cell#, [Find1], [Find2], [Find3], [Find4], [Row#], [EndMarker], [Look#], [ErrorMsg], [Type] )

Parameters

    
URL =   The web page to retrieve the table cell from.

Cell# =   The number of cells to skip forward (after function is positioned on the page by "Find1" thru "Find4" and "Row#") before returning data.

Using a negative value for this parameter causes the function to skip to the end of the row (i.e. the next "</tr>" HTML tag), and then search backwards for table cells from there. So, a -1 would target the last table cell in the row.

Find1 =   An optional string value to search for to position the function on the page before skipping ahead rows and cells to find the data to return. Defaults to "<BODY".

Find2 =   An optional string value to search for to further position the function on the page (after finding the "Find1" string) before skipping ahead rows and cells to find the data to return. Defaults to " ".

Find3 =   An optional string value to search for to further position the function on the page (after finding the "Find1" thru "Find2" strings) before skipping ahead rows and cells to find the data to return. Defaults to " ".

Find4 =   An optional string value to search for to further position the function on the page (after finding the "Find1" thru "Find3" strings) before skipping ahead rows and cells to find the data to return. Defaults to " ".

Row# =   An option number of rows to skip ahead (after function is positioned on the page by "Find1" thru "Find4") before skipping ahead the specified number of table cells to find the data to return. Defaults to 0.

EndMarker =   An optional string value that marks the end of the skip aheads based on "Cell#" and "Row#". If the next found table cell ia after this point, the error message is returned. Defaults to "</BODY", but is usually set to "</TABLE" when using "Row#" to ensure that the search doesn't go outside the current table when skipping ahead by table rows.

Look# =   An optional number of consecutive cells to search for data in (ignoring empty table cells). Rarely used. Defaults to 0.

ErrorMsg =   An optional value to return if the table cell cannot be found based on specified parameters. Defaults to "Error".

Type =   An optional integer value to determine the type of Internet request to make. Defaults to 0. For now, other values are experimental:

0 = XMLHTTP "Get" Request
1 = IE Object Request
2 = HTMLDocument Request
3 = XMLHTTP "Post" Request
4 = WinHttpRequest.5.1 "Get" Request (for Yahoo urls that require a "crumb" value)

Examples Usage notes Update history

    Date   Description
 2014-03-08 Removed several no longer relevant usage notes
 2014-03-08 Added update history section
 2014-03-08 Added description of a negative value for the "#Cells" parameter.
 2014-03-08 Corrected several typos.
 2014-03-08 Changed "Parameters" layout slightly.
 2024-07-14 Added "Parameters Type 4".