ExtractTableData

Estimated reading: 6 minutes

The Extract Table Data activity extracts structured data from web tables and grid-based layouts and stores the extracted information in a DataTable for further processing within a workflow.

The activity can extract both column headers and row data from standard HTML tables and dynamic web grids. It also supports data extraction from paginated tables, including Next buttons, page-number navigation, Load More options, and infinite scrolling, consolidating all extracted records into a single DataTable output.

Activity Canvas

The activity canvas provides options to identify the target web table for data extraction or reuse an existing table definition.

Select Element: Opens the element picker, allowing you to select and capture the target table directly from the web page.

Link from Reusable Objects: Associates the activity with a table element stored in the project’s Reusable Objects repository, enabling reuse across workflows.

Properties

Input

Browser Type: Specifies the target browser type, such as Chrome, Edge, or Firefox. Accepts a String variable.

Browser Version: Specifies or displays the version of the target browser. Accepts a String value.

Execute By: Specifies the selector used to identify the target table, such as XPath, CSS Selector, or ID. Accepts a String value.

First Row As Header: Determines whether the first row of the table is treated as column headers.
True: Uses the first row values as column names.
False: Uses the table headers if available or generates default column names.

Frame Path: Specifies the frame path if the target table is located within an iframe. Accepts a String value.

URL: Specifies the URL of the web page containing the target table. Accepts a String variable

Wait For Ready: Specifies the page readiness state to wait for before locating and extracting the table.

Wait Time: Specifies the maximum time, in milliseconds, to wait for the target table to become available before timing out. Accepts an Integer value.

Note: When you select the target table using Select Element, the Browser Type, Browser Version, Execute By, and URL properties are automatically populated with the captured information. These values can be modified if a different configuration is required.

MISC

Display Name: Displays the name of the activity.

Skip On Error: Specifies whether the workflow execution should continue when the activity encounters an error.
True: The workflow continues execution even if an error occurs.
False: The workflow stops execution when an error occurs.
None: The default value is set to False.

Version: Displays the current version of the activity.

Output

Add Page Number Column: Determines whether a page number column is added to the extracted data.
True: Adds a column indicating the page from which each row was extracted.
False: Extracts only the original table columns.

Data Table: Stores the extracted table data, including all headers and rows, in a DataTable variable.

Export File Path: Specifies the file path where the extracted data will be exported. Supports Excel (.xlsx) and CSV (.csv) formats.

Extract Links: Determines whether hyperlinks contained within table cells are extracted.
True: Extracts hyperlink values from table cells.
False: Extracts only the displayed cell text.

Pages Read: Outputs the total number of pages processed during extraction.

Result: Indicates whether the extraction completed successfully.
True: The extraction completed successfully.
False: The extraction failed or was interrupted.

Rows Read: Outputs the total number of rows extracted into the DataTable.

Pagination

Delay Between Pages: Specifies the time, in milliseconds, to wait after navigating to the next page before extracting data.

Error On Page Load Timeout: Determines whether the activity throws an exception if a page does not load within the configured Page Load Timeout.
True: Throws an exception.
False: Continues according to the configured error-handling settings.

Max Pages: Specifies the maximum number of pages to process. A value of 0 extracts data from all available pages.

Max Rows: Specifies the maximum number of rows to extract across all pages. A value of 0 extracts all available rows.

Next Button Execute By: Specifies the selector used to identify the pagination control, such as a Next or Load More button.

Next Button Frame Path: Specifies the frame path containing the pagination control when it is located inside an iframe.

Page Load Timeout: Specifies the maximum time, in milliseconds, to wait for the next page to load before timing out.

Pagination Enabled: Enables or disables extraction across multiple pages.
True: Extracts data from paginated tables and combines all records into a single DataTable.
False: Extracts data only from the currently displayed page.

Remove Duplicate Rows: Determines whether duplicate records identified during extraction are removed from the final DataTable.

How It Works

1. Connects to the specified browser session and locates the target table. If a frame is configured, the activity navigates to the specified frame before extraction.

2. Waits for the table to become available, supporting both standard HTML tables and dynamically loaded web grids.

3. Captures column headers and maintains the correct column structure. If headers are unavailable, default column names are generated automatically.

4. Extracts row and column data from the current page. If enabled, hyperlink values and page-number information are also captured.

5. When pagination is enabled, the activity navigates through additional pages using the configured pagination method and waits for the next page to load.

6. Continues extracting data until all pages are processed or the configured Max Pages or Max Rows limits are reached. Duplicate rows can be removed if configured.

7. Consolidates all extracted data into a single DataTable output and updates the output properties with the number of pages and rows processed. If an export path is provided, the extracted data is also saved to the specified file.

Exception Handling

The Extract Table Data activity may fail if:

1. The target table cannot be found or does not load within the configured Wait Time.
2. The specified frame or pagination frame is invalid or inaccessible.
3. Pagination fails or the next page does not load within the expected time.
4. The browser session is closed or becomes unavailable during extraction.
5. The specified export file location is invalid or cannot be accessed.

Note: If SkipOnError is enabled, the activity continues execution by suppressing the exception and returns any data that was successfully extracted before the failure occurred.

Example

A workflow needs to extract product information from a paginated product catalog and save the results to an Excel file.

1. Drag the Extract Table Data activity onto the workflow canvas.
2. Click Select Element and select the target product table.
3. Enable Pagination and configure the pagination settings if the table spans multiple pages.
4. Assign a DataTable variable to the DataTable property.
5. Specify an Export File Path to save the extracted data.
6. Execute the workflow.

The activity navigates through the available pages, extracts the table data, consolidates all records into a single DataTable, and exports the results to the specified file.

Share this Doc

ExtractTableData

Or copy link

CONTENTS
Robility Chatbot
Robility Assistant
Online