Get Table Data

Obtain specific information from a variable containing a table. You can choose to obtain the following types of information:

  • The value of a specific item (identified by the item's row and column number)

  • The total number of items in the table

  • The total number of rows in the table

  • The total number of columns in the table

  • All the values in a specific row

  • All the values in a specific column

The GET TABLE DATA command works especially well with Excel and CSV files and in combination with Excel Commands.

  1. Enter the name of the variable in which the table is stored

  2. Enter the delimiters that separate each column and row

  3. Select the type of data to retrieve and provide additional information as required (varies by the type of data to retrieve)

    Single value:

    • The wizard will retrieve the value of the item at a specific location

      • Enter the column number and row number of the item to be retrieved

    Number of items:

    • The wizard will retrieve the total number of items in the table

      • No additional information is required

    Number of rows:

    • The wizard will retrieve the total number of rows in the table

      • No additional information is required

    Number of columns:

    • The wizard will retrieve the total number of columns in the table

      • No additional information is required

    Entire row:

    • The wizard will retrieve all the values in a specific row

      • Specify the row number of the values to be retrieved

      • NOTE: The values returned will be separated by the column delimiter you specified in 2

    Entire column:

    • The wizard will retrieve all the values in a specific column

      • Specify the column number of the values to be retrieved

      • NOTE: The values returned will be separated by the row delimiter you specified in 2

  4. Enter the name of the variable into which to place the retrieved data

Example

Let's say you run an e-commerce website. At the end of each day, you read the details of all the day's orders into a CSV file and place the contents into a variable called daily order table. You'd like to know the total number of orders.

This scenario is an example of one in which a combination of two Advanced Commands (GET TABLE DATA and Mathematics) work beautifully together.

Here is how the data would look formatted as a table:

Order Number

Order Total

Number of Items

34567

350.00

10

34568

785.00

15

34569

649.00

14

34570

134.00

1

34571

100.00

1

Totals

2018.00

41

And here's how it would be read from a CSV file into a variable:

daily order table =

Order Number, Order Total, Number of Items

34567, 350.00, 10

34568, 785.00, 15

34569, 649.00, 14

34570, 134.00, 1

34571, 100.00, 1

Total, 2018.00, 41

  1. Obtain the total number of rows in the table

Result:  rows = 7

  • For more information about using special characters such as <Space>, <Enter>, and <Tab> as delimiters, see Set Value

Adjust the total number of rows to obtain the number of orders (accounting for the header row and totals row).

Result: number of orders = 5