Skip to main content

Html To Data Table

Converts HTML table data to a data table format.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.

Inputs

  • Html - The HTML content or file path/URL containing the table to be converted.
  • Table Index - The index of the table to extract from the HTML (starting from 0).

Options

  • Output Type - Specifies whether to pass the table by reference or by value. Options are:
    • Pass By Reference
    • Pass By Value

Output

  • Table - The resulting data table converted from the HTML table.

How It Works

The Html To Data Table node extracts table data from HTML content and converts it to a data table format. When executed, the node:

  1. Validates that the HTML content is not empty
  2. Validates that the table index is a valid integer
  3. Reads the HTML content and extracts all tables using pandas
  4. Selects the table at the specified index
  5. Replaces any NaN values with empty strings
  6. Converts the data to a dictionary format with columns and rows
  7. Returns the data table

Requirements

  • Valid HTML content containing at least one table
  • A valid table index (if multiple tables exist in the HTML)

Error Handling

The node will return specific errors in the following cases:

  • Empty HTML content
  • Invalid table index
  • No tables found in the HTML content
  • Invalid HTML format

Usage Notes

  • The Html input can accept either a file path, URL, or direct HTML content
  • The Table Index is zero-based (0 for the first table, 1 for the second, etc.)
  • The Output Type option can be set to "Pass By Reference" for handling large HTML tables more efficiently
  • NaN values in the HTML table are automatically converted to empty strings
  • The first row of the HTML table is used as column headers