Extract a Table from a Worksheet

Locates and extracts a table from an Excel worksheet.

Overview

This procedure locates and extracts a table from an Excel worksheet.

Syntax

Below is a line-by-line overview of the automation syntax. Expand each line to learn more.

chevron-rightextract a table from the worksheethashtag

What does it do?

Begins table extraction from the current worksheet.

Where does it go?

This phrase should be written on a new line.

Is it required?

✅ Yes — This phrase is required.

Does it require data?

✅ Yes — A reference to the worksheet must be defined in the automation.

chevron-rightthe description is "table-description"hashtag

What does it do?

Describes the table to be extracted.

Where does it go?

Indented under extract a table from the worksheet where.

Is it required?

❌ No — This phrase is optional.

Does it require data?

✅ Yes — Replace table-description with a text description of the table you want to extract.

Example

the description is "sales data with monthly totals"
chevron-rightthe location is "A1:D10"hashtag

What does it do?

Specifies the cell range containing the table.

Where does it go?

Indented under extract a table from the worksheet where.

Is it required?

❌ No — This phrase is optional.

Does it require data?

✅ Yes — Replace A1:D10 with a cell range in Excel format that specifies the top-left and bottom-right corners of the table.

Example

the location is "A1:D10"
chevron-rightthe first header is "x"hashtag

What does it do?

Specifies the leftmost column header to start extraction.

Where does it go?

Indented under extract a table from the worksheet where.

Is it required?

❌ No — This phrase is optional.

Does it require data?

✅ Yes — Replace x with the name of the first column header.

Example

the first header is "Name"
chevron-rightthe last header is "y"hashtag

What does it do?

Specifies the rightmost column header to end extraction.

Where does it go?

Indented under extract a table from the worksheet where.

Is it required?

❌ No — This phrase is optional.

Does it require data?

✅ Yes — Replace y with the name of the last column header.

Example

chevron-rightthe first header location is "A6"hashtag

What does it do?

Specifies the exact cell location of the first header.

Where does it go?

Indented under extract a table from the worksheet where.

Is it required?

❌ No — This phrase is optional.

Does it require data?

✅ Yes — Replace A6 with an Excel cell reference where the first header is located. Must be on the same row as the last header location.

Example

chevron-rightthe last header location is "DR6"hashtag

What does it do?

Specifies the exact cell location of the last header.

Where does it go?

Indented under extract a table from the worksheet where.

Is it required?

❌ No — This phrase is optional.

Does it require data?

✅ Yes — Replace DR6 with an Excel cell reference where the last header is located. Must be on the same row as the first header location.

Example

chevron-rightthe row count is 40000hashtag

What does it do?

Limits the number of data rows to extract (excluding header).

Where does it go?

Indented under extract a table from the worksheet where.

Is it required?

❌ No — This phrase is optional.

Does it require data?

✅ Yes — Replace 40000 with the number of data rows to extract. If omitted, extracts to the end of the worksheet.

Example

chevron-rightthe openai model is "openai-model"hashtag

What does it do?

Specifies the OpenAI model to use for AI-powered table extraction.

Where does it go?

Indented under extract a table from the worksheet where.

Is it required?

❌ No — This phrase is optional.

Does it require data?

✅ Yes — Replace openai-model with a valid OpenAI model name.

Example

chevron-rightthe gemini model is "gemini-model"hashtag

What does it do?

Specifies the Gemini model to use for AI-powered table extraction.

Where does it go?

Indented under extract a table from the worksheet where.

Is it required?

❌ No — This phrase is optional.

Does it require data?

✅ Yes — Replace gemini-model with a valid Gemini model name.

Example

Examples

1. Extract Table by Description

2. Extract Table by Cell Range

Extracts a table from a specific cell range.

3. Extract Table by Header Range

Extracts a table between specified column headers.

4. Extract Table by Header Locations (Fast)

Extracts a table using exact header cell locations - faster than header name matching.

5. Extract Table by Header Locations with Row Limit

Extracts a table using header locations with a specific number of data rows.

6. Extract Table by Description with Custom Model

Extracts a table using AI-powered description with a specific model.

Last updated

Was this helpful?