1. Home
  2. Spreadsheets
  3. Guide to using the spreadsheet

Guide to using the spreadsheet

Genstat has extensive spreadsheet facilities for data entry, import, export and manipulation. A Genstat spreadsheet provides a way of visibly displaying and manipulating your data.

Example Spreadsheet

Figure 1 – This shows an example of a book containing a single Vector spreadsheet.

Within Genstat you can have multiple spreadsheets contained together within a single book. Each spreadsheet is contained on a separate page within the book and is known as a sheet. Each page has an associated tab displayed above the sheet containing the name of the sheet. If a book only contains one sheet, then no tab is displayed.

Figure 2 – This shows an example of a book containing 2 sheets. The visible sheet is called Sheet2 and is a Matrix spreadsheet.

Creating spreadsheets

A blank spreadsheet can be created by selecting either Spread | New | Create or File | New on the menu bar. This opens a dialog
where the you can specify the spreadsheet type and initial number of rows and columns for the spreadsheet. The initial number of rows and columns need not be set to the exact size required as these can always be extended or removed at a later date.

A spreadsheet can be created with data by loading data that is currently present in Genstat by selecting Spread | New | Data in Genstat. Spreadsheets can also be created by opening data from files.

Maintaining multiple book windows

In Genstat you can have more than book open at a time and books can contain multiple spreadsheets. The Spread menu commands on the menu bar act on the current spreadsheet within the active book. The current spreadsheet is indicated within the Window title for the book and also on the status bar. If you load data from the same data structure into more than one spreadsheet (in the same book or in different books) a separate copy of the data will be maintained in each spreadsheet. In this situation caution must be taken so that you only update Genstat from the appropriate copy of data.

Opening and saving Genstat spreadsheets

Genstat spreadsheets and books can be open and saved in a wide range of formats. The best way to save spreadsheets is to use Genstat’s spreadsheet (GSH) or book (GWB) format. For multi-paged books all the spreadsheets within the book can saved using the Genstat Book (GWB) format. This format preserves all the column attributes such as type, widths, decimal places etc., for each spreadsheet contained within a book. Individual spreadsheets can be saved in the Genstat Spreadsheet (GSH) format, like the book format this preserves all column attributes. Data saved in either the GWB or GSH format can be opened into a spreadsheet/book or directly as Genstat data. Data can also be opened into a spreadsheet or book from many other data formats such as Excel, Quattro etc.

Manipulating data

There are a wide range of facilities in Genstat for manipulating data within a spreadsheet. These include facilities such as sorting, restricting, stacking and unstacking data. All these facilities can be accessed using the Spread menu bar item. A shortcut to some of the most common manipulation commands can be accessed by using the right-click menu on the spreadsheet.

Spreadsheet Types

In Genstat data are stored in different types of data structures, such as scalars, variates, factors and matrices. There are six different types of spreadsheets that can be used to display or manipulate data.

  1. Vector Spreadsheet
    This is the default type of spreadsheet and can contain one or more vector data structures
    (variates, texts and factors). Each column within the spreadsheet contains
    the values of one data structure and all the data structures must be the same length. By default,
    columns are variates, but they can easily be converted to another data type.
  2. Scalar Spreadsheet
    This type of spreadsheet can contain a single row of one or more scalars (single value).
  3. Table Spreadsheet
    This type of spreadsheet can contain tables. A table is a data structure that stores a
    multi-dimensional array of numbers where each dimension is classified by a factor. A
    spreadsheet can display tables with up to 9 dimensions. One dimensional tables that have the
    same classifying factor can be displayed on the same sheet, otherwise only a single table
    can be displayed on a sheet.
  4. Matrix Spreadsheet
    This type of spreadsheet can contain a single matrix.
  5. Symmetric Matrix Spreadsheet
    This can contain a single symmetric matrix. Only the values of the lower triangle of the
    symmetric matrix are displayed. The cells in the upper triangle are empty and values cannot be
    entered in these cells.
  6. Diagonal Matrix Spreadsheet
    This can contain a single diagonal matrix where the values are displayed within a column.

Converting between spreadsheet types

You can convert from one type of spreadsheet to another using the menu item Spread | Column | Convert.

Updating the data in Genstat

Data displayed within a spreadsheet are not maintained simultaneously within the Genstat data core. This allows data to be manipulated without continuously updating the data core. Therefore, any changes to the data should be updated in Genstat before the data can be used within menus or programs. By default, data is automatically updated in Genstat whenever you switch focus from the spreadsheet and activate another window or menu (for example, by clicking in another window or menu). The automatic updating facility can be disabled by removing the check box selection at the bottom left of the spreadsheet window or by selecting Spread | Update | Auto Update Genstat. If the auto updating feature is not enabled then data can be manually updated in Genstat using the menu item Spread | Update.

See Also

Updated on July 23, 2018

Was this article helpful?