1. Home
  2. Column Types (data types)

Column Types (data types)

Columns within Genstat can only be a variate (numerical values), text (strings) or a factor whereas in Excel you can have a mixture of cell types within a column. When importing data from Excel to Genstat any column containing a text item will be read into Genstat as a text column (and any numbers within the column will be converted to the text string representing its value). Within Excel you can use a marker (a special character) in the column header to identify and convert the data when it is imported into Genstat. This can be done in two ways:

  1. as a suffix on the column name
  2. as a prefix in a comment on the column name cell (see Using Excel Cell Comments with Genstat)

The following markers can be added to column names/cell comments.

! Interpret the column as a factor
# Interpret the column as a variate
$ Interpret the column as a text
:D Display the column as a date
:T Display the column as a time
:0, :1, :2 … :9 Display the column with a fixed number of decimal places
:E Display the column in scientific format

The ! marker can be applied in conjunction with the Date :D or Time :T markers, so that !:D would indicate a factor with levels displayed as dates.

In the Excel spreadsheet below, column A will be imported into Genstat as a factor while column B will be imported as a date.

Updated on December 14, 2018

Was this article helpful?