Getting a Table from Excel

This procedure is part of the Excel Book. A newer version of the Book is available via the BDK (v2).

Overview

You can get a table from an Excel file by specifying the column headers. Tables can be further operated on using table operations.

🔔 Note: This operation applies to a sheet.

Syntax

get the sheet's table whose first header is "{start column}" and whose last header is "{end column}"

Inputs

  1. start column: The starting column for the table.

  2. end column: The ending column for the table.

Example

Consider the following table:

Name
Age
Favorite Book
Favorite Genre

Alice

25

Pride and Prejudice

Romance

Bob

32

The Hobbit

Fantasy

Charlie

28

1984

Dystopian

Diana

22

To Kill a Mockingbird

Historical Fiction

Ethan

35

The Da Vinci Code

Thriller

The following operation will retrieve a subset of the table by selecting the columns from "Name" to "Favorite Book":

open the sheet at the spreadsheet file
get the sheet's table whose first header is "Name" and whose last header is "Favorite Book"

This is the resulting table:

Name
Age
Favorite Book

Alice

25

Pride and Prejudice

Bob

32

The Hobbit

Charlie

28

1984

Diana

22

To Kill a Mockingbird

Ethan

35

The Da Vinci Code

Last updated

Was this helpful?