New Table with State Names as Headers

The following script is an example of how to use a defined set of header names as the row or column header for a new table. The user is prompted to choose row or column as the header orientation, and how many rows|columns to add below|to the right of the headers.

You can easily adapt this script to work with any set of headers, by replacing the list at the top of the script with the list of headers you want to use; and editing the prompt dialog to conform with the type of headers you’re using.

It provides examples of these techniques:

  • Interacting with the script user (9, 15, 19)
  • Building a table and populating it with data from a list (52-64)

Here’s the script: