FSPREADSHEET procedure
Creates a GenStat Spreadsheet file (GSH) from specified data structures, PC Windows only (D.B. Baird).
Options
Parameter
Description
FSPREADSHEET can be used to create a new spreadsheet or GSH spreadsheet file or to update an spreadsheet open in the windows interface.
The DATA parameter should be set to any one of the following combinations of data structures: a list of vectors (variates, factors and texts), a matrix, a symmetric matrix, a diagonal matrix, a two-way table, a list of one-way tables or a list of scalars. If you specify a list of vectors they must all be the same length and, if any are restricted, the restrictions must be compatible (the same subset of units for all restricted vectors).
If OUTFILE is set, the output is sent to the specified file; otherwise a new spreadsheet is opened containing the data. The SHEET and METHOD options are for updating open spreadsheets. The number provided by SHEET is the position of the spreadsheet in the list of currently open spreadsheets. Thus SHEET=1 will add or update data in the first spreadsheet in the window list, SHEET=2 the second etc. Setting SHEET=0 will cause GenStat to update the first sheet with matching stuctures (i.e. for a variate this will be a VECTOR sheet with the same number of rows). The GenStat interface uses internal pointers to the spreadsheet structures which appear as large integers, and these should not be re-used in your saved code. The BOOK option allows you to specify the particular book that the sheet is to be created in (if SHEET is not set). Setting BOOK=0 will cause the sheet to be placed in a new book, even if the default option in the Windows interface is to add sheets from the server to the last book with focus, and setting BOOK=-1 will cause the sheet to be added to the last book created by FSPREADSHEET with BOOK=0. Setting BOOK=-2 will cause the sheet to be added to the last created spreadsheet. The PAGENAME option allows the tab name displayed when multple sheets are in a book to be specified. If METHOD=replace, then any existing columns of the same name will be replaced in the spreadsheet, and if METHOD=rename, the old columns will be retained, and the new columns will be renamed.
The TITLE parameter can use used to specify text for a title. The CURSOR option specifies the current cell to have focus when the spreadsheet is opened in a window. The POINTER, ANALYSIS, ASETUP and DUMMY options allow GenStat directives to be attatched to the spreadsheet for use in the Spread > Sheet > Analysis menu.
(Note: FSPREADSHEET replaces the procedure %WSPREAD from earlier editions of GenStat.)
Options: OUTFILE, SHEET, METHOD, READONLY, TITLE, POINTER, ANALYSIS, ASETUP, DUMMY, CURSOR, BOOK, PAGENAME.
Parameter: DATA.
Method
Internal directives are used to write the data to a GSH file which holds the data in a binary format. A message is sent to the windows interface to read this file if OUTFILE is not set.
Action with
RESTRICT
Restrictions on the structures are included in the spreadsheet created. If the restrictions on the structures are not consistent, a fault will occur.