.TH xspread "" "" "X Application"
.PC "X Windows spreadsheet"
xspread [\-hcmnrx] [\-fn \fIfont\^\fB] [\fIfile\^\fB]\fR
.PP
.B xspread
is a spreadsheet that runs under the X Window System.
It supports many standard spreadsheet features, including the following:
.IP \(bu 0.3i
Cell entry and editing.
.IS \(bu
A worksheet size of 702 columns by unlimited rows.
.IS \(bu
File reading and writing.
.IS \(bu
File encryption.
.IS \(bu
Absolute and relative cell references.
.IS \(bu
Numeric and label (i.e., character) data in cells.
.IS \(bu
Left or right justification for labels.
.IS \(bu
Row and column insertion and deletion.
.IS \(bu
Hiding and unhiding of rows and columns.
.IS \(bu
Range names.
.IS \(bu
Manual or automatic recalculation.
.IS \(bu
The numeric operators
.BR + ,
.BR \- ,
.BR * ,
.BR / ,
.B ^
(exponentiation), and
.B %
(modulus).
.IS \(bu
The relational operators
.BR < ,
.BR <= ,
.BR > ,
.BR >= ,
.BR = ,
and
.B !=
(not equal).
.IS \(bu
The logical (or Boolean) operators
.B &
(and),
.B |
(or), and
.B ~
(not).
.IS \(bu
Function references.
.IS \(bu
Graphs:
XY, bar, stack bar, pie, and line graphs.
.IS \(bu
The matrix operations
.BR Transpose ,
.BR Multiply ,
.BR Add ,
.BR Subtract
and
.BR Inversion .
.IS \(bu
Cursor positioning with mouse.
.IS \(bu
Menu-item selection with mouse.
.IS \(bu
References to external programs.
These are called ``external functions''. 
.PP
The structure and operation of the spreadsheet is similar to but not 
identical with popular spreadsheets, such as Lotus 1-2-3.
Like other spreadsheets, the workspace is arranged into rows and columns
of cells.
Each cell can contain a number, a label (i.e., a string),
or a formula that evaluates to a number or label.
.PP
You can start the program with or without specifying a
.I file
of data; this file must be a saved worksheet.
If you name a
.I file
on the command line,
.B xspread
attempts to locate and read it.
If it could read
.IR file ,
.B xspread
displays its contents in the workspace.
If it is could not read
.IR file ,
or if you did not name a file on the command line,
.B xspread
starts with the workspace empty.
.SH "Command-line Options"
.B xspread
recognizes the following command-line options:
.IP \fB\-c\fR 0.3i
Perform recalculation in column order.
When
.B xspread
recalculates, it will start at the top of the leftmost column
and recalculate the all the cells from top to bottom.
It then recalculates the next column from top to bottom;
and continues in this fashion until it has recalculated every cell in
the rightmost column.
.B xspread
does
.I not
support natural-order recalculation.
By default,
.B xspread
performs row-order recalculation.
.IP \fB\-h\fR
Display command-line help.
.IP \fB\-m\fR
Start with manual recalculation.
With this option, the spreadsheet
recalculates values only when you use the command
.BR @ .
With automatic recalculation,
the spreadsheet recalculates values whenever a cell's contents change.
By default,
.B xspread
performs automatic recalculation.
.IP \fB\-n\fR
Use standard data-entry mode.
In this mode, you must specify if the data-entry item is numeric or a label:
if datum is a number, its first character must be a `=';
if it is a label, its first character must be a quotation mark `"',
less-than sign `<', or greater-than sign `>'.
.IP
If standard data-entry mode is not used,
.B xpread
assumes a datum is a number if it begins with a plus sign `+' or
minus sign `\-';
it assume that a datum is a label
if its first character is a greater-than sign `>', less-than sign `<',
or quotation mark `"'.
If the datum begins with anything else,
.B xspread
assumes that it is a command.
.IP
By default,
.B xspread
uses standard data-entry mode.
.IP \fB\-r\fR
Perform recalculation in row order.
This is the default.
When
.B xspread
recalculates, it will start at the left of the topmost row
and recalculate every cell from left to right.
Then it will recalculate the next row in the same order,
continuing until it has recalculated the bottommost row.
.B xspread
does
.I not
support natural-order recalculation.
.IP \fB\-x\fR
Use encryption when reading and writing files.
By default,
.B xspread
does not use encryption.
.SH "Using xspread"
The following image shows
.B xspread
displaying the sample spreadsheet
.BR /usr/X11/doc/xspread/demo_dates :
.PH 1 1 \*(XD/xspread.eps
As you can see, the
.B xspread
resembles most standard spreadsheets:
.IP \(bu 0.3i
The lower part of the window is the work area.
It is divided into cells; each cell is addressed by the number of its
row and the letter (or letters) of its column.
A cell can contain a string, a number, or a formula.
.IP \(bu
The upper part of the window is a command area.
It has three lines.
The top line identifies the cell that is highlighted, and gives its
contents.
The second line gives the current menu.
The third line gives the submenu of the menu entry that is highlighed.
.IP
For example, in the above image, the second line shows
.BR xspread 's
main menu, with the item
.B Matrix
highlighted.
The third line shows the entries in the
.B Matrix
menu.
.PP
To address a cell in the work area, move the mouse cursor to the cell
and click the left-mouse button.
You can then enter data into that cell.
.PP
To give a command, either type `/' or click the right-mouse button.
This brings up the main menu.
To select an item from a menu, either type its initial letter
(e.g., type `M' to invoke the
.B Matrix
entry from the main menu), or move the mouse cursor left or right until
.B xspread
highlights the entry you want, then click the left-mouse button.
.PP
To return to the parent menu of the current menu, press the
.B <esc>
key.
.PP
Most menu options are self-explanatory, and can be mastered with a little
practice.
For a detailed discussion of the menus and their options, see the
.I "Xspread Reference Manual"
that is included with the source code to
.BR xspread .
.SH Example
The following gives a mini-tutorial on using
.BR xspread .
.PP
When you installed
.B xspread
onto your \*(CO system, a set of sample spreadsheets were copied into
directory
.BR /usr/X11/doc/xspread .
The following exercises use these example spreadsheets.
.PP
To invoke
.B xpread
with the example file
.BR demo_dates ,
type
.DM
	xspread /usr/X11/doc/xspread/demo_dates
.DE
.PP
To invoke the main menu, press the `/' key or press the right-mouse button.
.PP
The following demonstrates graphing:
.IP \(bu 0.3i
Click on the
.B Graph
option in the main menu.
This displays the
.B Graph
menu.
.IP \(bu
Click on the
.B Type
option to choose the graph type.
.IP \(bu
Select any one of the five types of graph shown.
.IP \(bu
Choose option
.B X
to enter the labels for the X axis:
Enter a range of numeric values for the XY graph, then
enter a range of strings for all of the other graphs.
.IP
Note that the line, bar, stacked bar, and pie graphs all require the
X variable to be a string.
The XY graph requires that both variables be numeric.
.IP \(bu
Choose options
.B A
through
.B F
to enter in the numeric values.
These values must be numeric.
.IP \(bu
Click the option
.B Options
enter Titles, Legends, Grids, and so on.
.IP \(bu
Finally, click the option
.B View
to view the graph on the monitor.
.PP
The next example demonstrates matrix operations:
.IP \(bu 0.3i
Once again press `/' or click the right-mouse button to invoke the
main menu.
.IP \(bu
To get the sample file for for matrix operations,
choose the option
.B File
from the main menu.
When the file menu appears, click option
.BR Get ;
when the prompt box appears, type:
.DM
	/usr/X11/doc/xspread/demo_matrix
.DE
.IP \(bu
Press
.B <esc>
to return to the main menu.
Then click on the option
.BR Matrix .
.IP \(bu
When the matrix menu appears,
click option
.B Transpose
to find the transpose of a matrix.
At the prompt, type
.DM
	a5:c6 a0:b2
.DE
.IP
to enter a destination range and source range.
.B xspread
displays the results.
.IP \(bu
In the same manner, try the options
.BR Addition ,
.BR Subtraction ,
.BR Multiplication ,
and
.BR Inverse .
.PP
To save a spreadsheet, do the following:
.IP \(bu 0.3i
Press
.B <esc>
to return to the main menu.
.IP \(bu
Click option
.BR File .
.IP \(bu
When the file menu apprears,
click option
.BR Put .
.IP \(bu
At the prompt, type the name of the file into which you wish to save your
spreadsheet.
Press \*(RT to select the default path.
.PP
To exit
.BR xspread ,
press
.B <esc>
to return to the main menu; then click option
.BR Quit .
.SH "See Also"
.B
X applications
.R
.br
\*(CO Lexicon:
.B
bc,
dc,
crypt
.R
.SH Notes
.B xspread
saves only one value from any call to external functions via
@ext().
If
.B @ext()
is used more than once in a spreadsheet and external
functions are enabled and then disabled,
the last returned value pops up in several places.
.PP
The
.I "Xspread Reference Manual"
gives complete documentation for this program.
The LaTeX source copy for this manual is in the file
.BR xspread.tex ,
and is included with the source code to this program.
File
.B xspread.ps
contains the manual in PostScript form, and can be printed on any
PostScript printer or viewed with
.BR ghostscript .
.PP
.II sc
.II "Cornelius, James"
.II "Frey, Michael"
.II "Gruber, Dan"
.II "Wang, Fang"
.B xspread
is a modifed version of release 6.22 of the spreadsheet
.B sc
created by
James Cornelius,
Michael Frey,
Dan Gruber,
and
Fang Wang.
.II "Parbs, Robert"
.II "Jegers, James"
Version 2.0 was devised by
Robert Parbs;
versions 2.1 through 2.3 by James Jegers (jimj@cs.uwm.edu).
Please mail all changes, enhancements, and other comments about this
software to soft-eng@cs.uwm.edu.
.PP
Copyright \(co 1992 Board of Regents of the University of Wisconsin
System, on behalf of Department of Electrical Engineering and
Computer Science, University of Wisconsin\(emMilwaukee.
Please note that this program is protected by the Free Software Foundation's
``copyleft''.
For details on the rights it grants and the obligations it entails,
see the file
.B COPYING
that is included with the source code to this program.
