[Top] [Contents] [Index] [ ? ]

Oleo is the GNU spreadsheet program. This documentation is of Oleo version 1.99.13, as of July 29 2000. It is by no means complete, nor necessarily accurate for that matter.

1. Basics
2. Entering Data
3. Making Changes
4. Style
5. Multiple Windows
6. Options
7. Printing and Plotting
8. Macros
9. Programs
10. Keymaps and defining keys
11. Functions
12. Extending the Oleo system
13. Reporting Bugs
14. A Motif Graphical User Interface for Oleo
15. Accessing Databases
16. Key Index
17. Command Index
18. Function Index
19. Options Index
20. Concept Index


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1. Basics

Oleo is the GNU spreadsheet (1).

Oleo has more than one user interface. The traditional oleo environment shows a curses based (character mode) user interface. A bare bones user interface based on the X Window System exists as of version 1.6 which dates back to 1994. In 1998, development started for a motif based user interface. It should be more user friendly than the character based UI.

Most of this manual describes the character based user interface, the motif user interface is treaded in (see section 14. A Motif Graphical User Interface for Oleo).

To start Oleo, type oleo. If filename is the name of a spreadsheet that you have saved from a previous oleo session, you can type oleo filename to start Oleo with the spreadsheet loaded.

To stop Oleo, type C-x C-c. This will prompt you for the name of a file in which to save the current spreadsheet. If you do not want to save it, type RET, otherwise type the name of the filename that you wish to save it in, and then press RET.

Type C-z to suspend oleo. This does not do anything if you are running under X-windows.

If you wish to abort a command, type C-g

TypingHow to type commands
Cell referencingTwo ways of naming cells
The ScreenThe parts of the screen
Cursor and MarkThe cell cursor and the mark
RecalculationHow updating works
MovementMoving around the spreadsheet
MouseUsing the mouse
Regions and VariablesHow to use regions and variables
Getting HelpGetting help
Saving and readingSaving and reading Spreadsheets
Command Line OptionsCommand Line Options
.oleorc fileThe initialization file
ExpressionsTypes of expressions


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.1 How to type commands

We use emacs abbreviations for keystrokes. These examples should make the notation clear.

C-c
Hold down the control key and press c
C-D
Hold down the control key and press D (capital D)
C-x c
Hold down the control key and press x, then press c
C-u C-x c
Hold down the control key and press ux, then press c
M-c
Type an escape followed by a c. If you can't find the escape key, you can always type C-[.
M-C-c
Type an escape followed by C-c.

Some commands are not bound to key strokes. For instance, if you wish to erase the entire spreadsheet, you have to use the command clear-spreadsheet. To execute a command, type M-x and then the command name:
 
               M-x clear-spreadsheet


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.2 Cell Referencing

Many commands and functions operate on a given cell or group of cells, and therefore take a cell or range reference (address) as an argument. An individual cell is specified by its row/column coordinates, which start with row 1, column 1 in the upper left of the spreadsheet. A range is a rectangular group of cells, specified by giving its left and rightmost columns and top and bottom rows.

A reference may be absolute or relative. An absolute reference is measured from the upper left of the spreadsheet, and does not change when the cell containing it is moved or copied. A relative reference, however, is measured as an offset from the cell it is in, and when moved points to the cell at the same offset relative to the new location.

There are two ways of addressing cells in Oleo, called a0 and noa0. To switch between the modes, use the set-option command:

M-x set-option a0
Sets a0 mode.
M-x set-option no a0
Sets noa0 mode.

In both modes the case of cell and range letters is ignored.

noa0 modeUsing noa0 Mode
a0 modeUsing a0 Mode
ComparisonComparing a0 and noa0 modes


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.2.1 noa0 Mode

In noa0 mode (the default), absolute cell addresses have the form RrowCcol, where row and col are the row and column (as integers). Thus, R1C2 is the second cell from the left on the top row. The cell in the leftmost uppermost corner is R1C1, and the cell in the rightmost lowermost corner is R65535C65535.

Relative addresses have the form R[rowoffset]C[coloffset], as in R[-1]C[+1] (the cell above and to the right of the current cell). An offset of 0 can be omitted, along with its square brackets: RC[+2] (the cell two columns to the right). The plus signs of positive offsets can also be omitted. Absolute and relative addresses can be combined, as in R4C[-1] (the cell in row four that's one left of the current cell).

Ranges in noa0 mode are specified as Rrow1:row2Ccol1:col2, where the row and column references may be either absolute or relative, and can be mixed. Thus, R1:4C1:[-2] refers to the cells of rows one through 4, columns one through the second column to the left. If row1 = row2 or col1 = col2, the colon and second number may be omitted, as in R1:10C2 (rows one through ten in column two).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.2.2 a0 Mode

In a0 mode, relative references have the form col_let row_num, where col_let is the letter of the column and row-num is the row number. col_let can be upper or lower case. The cell in the leftmost uppermost corner is A1, and the cell in the rightmost lowermost corner is CRXO65535. The columns are initially single letters (A-Z) , then double letters (AA-ZZ), then triple letters (AAA-ZZZ), and finally some quadruple letters (AAAA-CRXO).

B3 refers to the cell in the second column of row 3. Since this is a relative reference, it will change when the containing cell is moved, to refer to the cell at the same relative position; e.g., if the cell is moved two columns to the right the reference will change to D3.

Absolute references have the form $col_let$row_num, as in $A$1 (top left cell). These do not change when the containing cell is moved. Both types can be mixed with predictable results, e.g., $A4 has an absolute column but a relative row.

Ranges are given as cell_ref:cell_ref or cell_ref.cell_ref, where the cell_refs describe diagonally opposite corners of the range. Thus, A1:B2 refers to the topmost, leftmost four cells in the spreadsheet.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.2.3 Comparison

In order to get an understanding of these two addressing modes, assume that the cell cursor is in E7 = R7C5. The left hand column is noao mode, and the right hand one is a0 mode.

 
                 R1C2              $B$1
                 R[-1]C[+1]        F6
                 RC[+2]            G7
                 R4C[-1]           $D4


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.3 The Screen

The screen is divided into three parts: the input line, the status line, and the work area.

MinibufferThe input line
Status Line The status line
Work AreaThe work area and its borders


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.3.1 The input line

The input line is also referred to as the Minibuffer. This is where you enter data into cells (see section 2.2 Entering values in a cell). You can change the location of the input line. For example, to change the input line to the bottom of the screen, type

 
M-x set-option RET input -1

This can be made the default. (see section 1.12 The `.oleorc' file)


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.3.2 The status line

The status line describes the current status. This includes:

For instance, if the mark is located at cell D4, the cell cursor is in cell A11, the cell contents is @sum(A1.B10), and the sum of the entries in the region A1.B10 is 89, then the status line is

 
*A11:D4 89 [@sum(A1.B10)]

The `*' indicates that the mark is set, and thus A11:D4 is the range from the cursor cell to the mark. You can change the location of the status line using M-x set-option. To move the status line to the bottom of the screen, type

 
M-x set-option RET status -1


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.3.3 The work area and its borders

The work area is surrounded by a border giving the row and column numbers. When there are multiple windows, there will be several borders. A cell is a box that can hold data. The cell cursor is the highlighted rectangle indicating the `active cell'. A region is a rectangular block of cells. Regions are described by giving coordinates of the upper left cell and lower right cell.

The appearance of the screen can be changed (see section 6.1 Changing Oleo's appearance).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.4 The cell cursor and the mark

Every window has its own cell cursor. The most recently used window defines the current cell position. There is one cell marker, called the `mark', global to the spreadsheet.

C-x j
You are asked for a cell to go to, and the cell cursor is moved there. The cell can be either a cell name as in R32C96, or a variable. This command starts with a default of wherever the cursor was the last time this command was used. (goto-cell)

M-x j
You are asked for a region. The cursor is placed in the top-left corner of the region, and the cell-mark is placed at the opposite corner of the region. (goto-region)

C-@
Set the cell mark to the current cell. (mark-cell)

C-u C-@
Set the cell cursor equal to the mark, and clear the mark,

C-x C-x
Exchange the cell cursor and cell mark. (exchange-point-and-mark)

C-u C-x C-x
Clear the mark.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.5 How updating works

Oleo periodically recalculates the values of the spreadsheet that can change. This calculation can be done between keystrokes, and usually stops when a key is pressed. This behavior can be changed with the options background and nobackground. The time between updates (initially 10 seconds) can be changed using the option ticks. You can also disable automatic recalculation with the option noauto. In this case, recalculation is only done when the recalculate command is used. (see section 6. Options)

C-x !
Recalculate the spreadsheet until all the cells whose values may have changed have been evaluated. If there are circular cell references, the cells in the loop will be evaluated at most 40 times (this number subject to change!). (recalculate)


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.6 Moving around the spreadsheet

Single Cell MovementMoving to a neighboring cell
ScanningFinding the next empty cell
Large Scale MovementMoving long distances
Movement examplesExamples of movement commands
Screen MovingMoving by screens


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.6.1 Moving to a neighboring cell

The arrow keys work in the obvious fashion, moving the cell cursor one cell in the direction of the key. In addition, there are keyboard commands

C-p
Move up one cell (up-cell)
C-n
Move down one cell (down-cell)
C-f
Move forward (right) one cell (right-cell)
C-b
Move backward (left) one cell (left-cell)

There are also commands for diagonal movements, but they are not bound to any keys. These commands are upleft-cell, downleft-cell, upright-cell, downright-cell.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.6.2 Finding the next empty cell

These commands move to the next empty cell in a given direction. (3)

M-p
Move to the first empty cell above the current cell in the current column. If given a repeat count, go to the N-th most empty cell. (scan-up)
M-n
Move to the first empty cell below the current cell in the current column. If given a repeat count, go to the N-th most empty cell. (scan-down)
M-f
Move to the first empty cell to the right of the current cell in the current row. If given a repeat count, go to the N-th most empty cell. (scan-right)
M-b
Move to the first empty cell to the left of the current cell in the current row. If given a repeat count, go to the N-th most empty cell. (scan-left)


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.6.3 Moving long distances

These commands move over large areas of the spreadsheet, so they first set the mark to the current cell before moving (if it's not already set). You can thus jump back to where you were with C-x C-x (exchange-point-and-mark).

M-<
Go to the upper left cell (4). (upper-left)

M->
Go to lower right cell. The lower right cell is the cell in the rightmost column that has a value, and the lowermost row that has a value. There might not be any value in the lower right cell. (lower-right)

C-a
Go to the beginning of the row. With a C-u prefix argument n, it also moves n-1 (5) rows down first. (beginning-of-row)

C-e
Go to the last cell of the current row (that has a value). A C-u prefix is also accepted. (end-of-row)
M-C-a
Go to the beginning of the column. (beginning-of-column)
M-C-e
Go to the last cell of the current column. (end-of-column)


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.6.4 Examples of movement commands

We use the spreadsheet below. The blank squares are empty.

 

| A | B | C | D | E | F | --|---|---|---|---|---|---| 1 | | | | | | | --|---|---|---|---|---|---| 2 | | | x | | x | | --|---|---|---|---|---|---| 3 | | | x | x | x | | --|---|---|---|---|---|---| 4 | | x | | | | | --|---|---|---|---|---|---|

The first column is the command, the second is the cell the cell cursor is in initially, and the third column is the location of the cell cursor at the end of the command.

 

M-< B4 => A1

M-> B4 => E4 M-> C2 => E4 C-a E4 => E1 C-a D4 => E1

C-e A4 => B4 C-e A3 => E3 C-e A2 => E2 C-e A1 => A1

M-C-a E2 => E1 M-C-e B1 => B4

M-f A4 => C4 M-f A2 => D2


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.6.5 Moving by screens

These commands scroll the current window one screenful in the appropriate direction. They try to leave the cell cursor in approximately the same place, so that M-v followed by C-v should leave the cell cursor in the original cell. In addition to these commands, there are diagonal movements that are not bound to keys: scroll-upright, scroll-upleft, scroll-downright, scroll-downleft.

M-v
Scroll up one screenful. (scroll-up)
C-v
Scroll down one screenful. (scroll-down)
C-x >
Scroll right one screenful. (scroll-right)
C-x <
Scroll left one screenful. (scroll-left)


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.7 Using the mouse

It is possible to use to mouse to move the cell cursor. down-mouse-0 means to press the leftmost mouse button.

down-mouse-0
Move to the cell pointed to by the mouse. (mouse-goto)

down-mouse-1
Set the mark to the cell pointed to by the mouse, but don't move the cell cursor. (mouse-mark)

down-mouse-2
Set the mark to the current cell, and move to the cell pointed to by the mouse. (mouse-mark-and-goto) (6)


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.8 Regions and Variables

Variables are symbolic names for regions of a spreadsheet. Once defined, they can be used in cell formulas as region addresses. They can also be used as arguments to any command that expects a region address. A variable name should not be the name of a cell. Thus, A1 is not a good name for a variable.

C-x :
Use this command to set a variable (set-variable). For instance, to set the variable test1 to the region B2:C3, type
 
        C-x :   test1    RET   B2:C3   RET

C-h v
Shows the value of a variable. To find the value of test1, type
 
        C-h v test1 RET
If the variable has not been defined you get an error. If you mistype test1 as tset1, you get the message
 
        there is no 'tset1'

C-h C-v
This lists all variables and their current values.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.9 Getting Help

C-h
Enter into the help system. The commands below give various bits of information about Oleo.

C-h C
When a complex command is being invoked (i.e., when Oleo is prompting you for arguments), C-x C displays documentation for the command being invoked. This can often be used to get more information about what is being prompted for.

C-h c
Give the name of the command (if any) associated with of the next keystroke(s). For instance, to find out command is executed when you type M-p, type C-h c M-p. (describe-key-briefly)

C-h k
Give a brief description of the command associated with the next keystroke(s). For instance, to find out what M-p does, type C-h k M-p. (describe-key)

C-h f
Give a description of a command (one that you execute with M-x). For instance, to find out exactly what `scan-up' does, type C-h f scan-up. (describe-function)

C-h F
Give a description of a formula function. For instance, to find out how to use `@sum', type C-h F sum. Note that even though @sum is used in a0 mode, you must type C-h F sum, not C-h F @sum. (describe-formula-function)

C-h w
Give the key(s) (if any) that a command is bound to. For example, to find which keys `scan-up' is bound to, type C-h w scan-up. (where-is)

C-h v
Show the value of a variable. (show-variable)

C-h C-v
Show the values of all the variables. (show-all-variables)

C-h o
Show all the options that have been set. (show-options)

C-h W
Display all the bindings of the keys. (view-wallchart)

C-h C-w
Write all the bindings of the keys to a file. (write-wallchart)


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.10 Saving and Reading Spreadsheets

Oleo can save a spreadsheet, visit a saved one, or merge with a previously saved one.

C-x C-s
Save the spreadsheet to a file, using the current file-format. (save-spreadsheet) (7)

C-x C-v
Read in a file in the current file-format. This erases the current contents of the spreadsheet first. This may ask for confirmation. (visit-spreadsheet)

C-x i
Read in a file and merge its contents into the current spreadsheet. Note that some file-formats, (like panic-save) won't work with this command. (merge-spreadsheet)

M-x toggle-load-hooks
Change whether load-hooks are run when spreadsheets are loaded. When active, the find-alternate-spreadsheet command looks for a variable called `load_hooks' and executes the macro at that address. With a positive prefix argument, turns load hooks on. With a negative argument, turns them off. With no argument, acts as a toggle. (8)


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.11 Command Line Options

At the command line, Oleo has several options

 
        oleo [options] [file]

where file is an optional spreadsheet to open. The remaining options are

-q
--quiet
Be quiet. (9)
-V
--version
print out the version and exit
-h
--help
Describe these options
-f
--ignore-init-file
do not read the file `.oleorc' on startup
--nw
do not use X-windows
-F x
--format x
set the default file type to x (oleo, list, sc, ...)
--filter
stdin/stdout are used for reading and writing the spreadsheet Note this only works well for X Window System user interfaces, or in very specific circumstances.
-s x
--separator x
set separator for 'list' file type to x
-S
--space
set separator for 'list' file type to a space


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.12 The `.oleorc' file

If there is a file `.oleorc' located in the home directory, it is read when Oleo starts up. For example, if you always want to use the a0 reference system, and wish to have the status line on the bottom line, rather than on the second line from the top, your `.oleorc' file could be (10)

 
        set-option a0
        set-option status -1


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.13 Expressions

A cell entry is a value or an expression of values (see section 2.1 The different values in Oleo).

Infix expressionsInfix Expressions
ExamplesExamples of infix expressions
Error valuesA List of Error Values


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.13.1 Infix Expressions

The following infix expressions are defined. Values labeled N1 and N2 are numbers (floats or integers), bool booleans, str strings, and val any type (but both sides must be the same type).

-N1
Arithmetic negation: 0-N1
!bool
Logical negation: #TRUE if bool is #FALSE, #FALSE if #TRUE, and an error otherwise.
N1 ^ N2
Exponentiation. Note that a^b^c is defined to be a^(b^c).
N1 * N2
Multiplication
N1 / N2
Division
N1 + N2
Addition
N1 - N2
Subtraction
N1 % N2
Modulus; the remainder of N1 / N2.
N1 >=N2
#TRUE if N1 is greater than or equal to N2; else #FALSE
N1 > N2
#TRUE if N1 is greater than N2; else #FALSE
N1 < N2
#TRUE if N1 is less than N2; else #FALSE
N1 <=N2
#TRUE if N1 is less than or equal to N2; else #FALSE
val1 = val2
Comparison: #TRUE if val1 and val2 can be considered equal, #FALSE if not. val1 and val2 can be numbers, strings, or boolean values.
val1 != val2
Equivalent to !(val1 = val2).
str1 & str2
Text concatenation of strings.
bool ? val1 : val2
Like the C operator: if bool is #TRUE, val1 is evaluated; if bool is #FALSE, val2 is evaluated; otherwise an error is returned.
(expr)
Overrides default precedence of expression expr. Note that since Oleo stores expressions in a byte-compiled form, unneeded parentheses will mysteriously vanish.

1.13.2 Examples
1.13.3 Error Values


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.13.2 Examples

Assume that the spreadsheet contains the figure below, where the block of X's marks the cursor.

 

| C | D | | | | -------------------- | | | 2 | 3 | | -------------------- | | | 3 | "A" | "B" | -------------------- | XXX | | 4 | XXX | 7 | --------------------

Here are some computations in a0 mode.

 
                C2 * D4    =>     21

D4 % C2 => 1

C2 = D4 => #FALSE

C3 < D3 => #TRUE

C3 & D3 => "AB"


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.13.3 Error Values

Error values are returned by the parser under various error conditions, such as invalid parameters to functions, badly formatted expressions, etc.

#TRUE
#FALSE
The boolean true and false values. Not really errors, but classified as such to distinguish them from numbers and strings.
#ERROR
An unclassified error.
#BAD_INPUT
Indicates an inappropriate parameter to a formula function.
#NON_NUMBER
A numerical value was expected.
#NON_STRING
A string value was expected.
#NON_BOOL
A boolean value was expected.
#NON_RANGE
A range value was expected.
#OUT_OF_RANGE
An out-of-range value was given, such as a cell coordinate outside a given cell range.
#NO_VALUES
An error value.
#DIV_BY_ZERO
A division by zero was attempted.
#BAD_NAME
An error value that indicates an invalid variable name. It may be the symptom of an incorrectly written address, or a string literal given without double quotes.
#NOT_AVAIL
An error value.
#PARSE_ERROR
A generic error value that indicates the parser failed to parse an expression.
#NEED_OPEN
An open parenthesis is missing.
#NEED_CLOSE
A close parenthesis is missing.
#NEED_QUOTE
A quote was expected; e.g., the terminating quote of a string literal.
#UNK_CHAR
An unknown character was encountered.
#UNK_FUNC
An unknown function was called.
#INF
#INFINITY
#NINF
#MINUS_INFINITY
#NAN
#NOT_A_NUMBER
Various floating-point exceptions. On some machines these may be all the same value, or indistinguishable from other values.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2. Entering Data

2.1 The different values in Oleo
EnteringEntering values in a cell
Input EditingEditing in the input line
Cell MotionMoving to the next input cell while editing


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.1 The different values in Oleo

A value can be a literal (an immediate value, like "foo", 16, or #TRUE), a function call, or another expression. There are 5 types of values:


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.2 Entering values in a cell

To enter values into an empty cell, simply start typing. To replace the contents of a cell or of all cells in a region, use

=
Replace the contents of the current cell. (set-cell)
M-=
Replace the contents of a region. (set-cell-region)

For example, to put the numbers 2,3,...,11 in the cells from B1 to B10, type
 
        M-=  B1.B10   RET   @row()+1   RET


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.3 Editing in the input line

When the spreadsheet is reading text input, you can use a few text-editing commands. Note that there in no history mechanism and no yank command. If you accidentally type C-u, the text is erased. (11)

While the input area is active, the commands that move the cell cursor are disabled. If you want to move the cell cursor, use the other-window command (C-x o) to leave and later reenter the input area.

M-a
Insert/over-write an absolute reference to the current cell/region. (insert-abs-ref)
M-r
Insert/over-write a relative reference to the current cell/region. (insert-rel-ref)
C-e
Insert/over-write the expression in the current cell into the input area. (insert-cell-expression)
M-e
Insert/over-write the value (not the formula) of the current cell into the input area. (insert-cell-value)
C-a
Move the cursor to the beginning of the text. (cursor-begin-line)
C-e
Move to the end of the text. (cursor-end-line)
C-b
Move the cursor back a character. (cursor-back-char)
M-b
Move back a word. (cursor-back-word)
C-f
Move forward a character. (cursor-fwd-char)
M-f
Move forward a word. (cursor-fwd-word)
C-d
Delete the character under the cursor. (delete-next-char)
M-d
Delete the word under the cursor. (delete-next-word)
C-?
Delete the character to the left of the cursor. (delete-prev-char)
M-C-?
Delete the word to the left of the cursor. (delete-prev-word)
C-k
Delete from the cursor to the end of the text. (delete-to-end)
C-o
Move the cursor into the cell area.

The following commands are not bound to any keys

toggle-overwrite
Toggle between overwrite and insert mode.
delete-to-start
Deletes from the cursor to the beginning of the line

Almost all editing commands remember what you typed the last time you used that command, and start you up editing a copy of that text. If you want to type in something completely new, just type C-x (or C-u) and type in your new text.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.4 Moving to the next input cell while editing

When you are finished entering data in a cell, you type RET. If you wish to enter data in the cell below, type either C-i or the down-arrow key, and you are placed in the cell below, waiting for input. If you type the up-arrow key, you are placed in the cell above, waiting for input. If you type C-j, you move to the right. The direction of C-i can be changed - the commands are given below. For example, if you wish to move upwards when you type C-i, type C-x m ^.

C-i
Enter the data, and move to next cell. The tab key also does this. (next-edit)
C-j
Enter the data, and move to next cell in alternative direction (next-edit-set)
C-x m ^
auto-move-up
C-x m v
auto-move-down
C-x m <
auto-move-left
C-x m >
auto-move-right
C-x m `
auto-move-up-left
C-x m '
auto-move-up-right
C-x m /
auto-move-down-left
C-x m \
auto-move-down-right
C-x m
auto-move-no-motion


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3. Making Changes

CopyingCopying cells and regions
MovingMoving Cells and regions
DeletingDeleting cells and regions
InsertionInserting a new row or column


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1 Copying

Both the cells, and the calculated values in the cells, can be copied from one location to another. Note, however, that any relative cell addresses present in formulas will refer to different cells -- those at the same offset from the new location. In a0 mode, this means that the relative addresses in the new locations' formula(s) will change to reflect the new cells they refer to.

M-c
Copy a region. Given two ranges, it copies the source range into the destination range. If the destination range size is a multiple of the source range size, the source range is copied multiple times. If the destination range is given as a cell, that cell is the location of the top-left corner of the destination range. (copy-region)
M-C-c
Copy just the values of one region to another. (copy-values-in-region)

Consider the spreadsheet, where B2 contains @sum(C2.D2):

 

| Col B | Col C | Col D | ------|-------|-------|-------| Row 2 | 8 | 3 | 5 | ------|-------|-------|-------| Row 3 | | 4 | 2 | ------|-------|-------|-------| Row 4 | | 1 | 3 | ------|-------|-------|-------|

If you type M-c B2 RET B3.B4, then B2 is unchanged, but B3 contains @sum(C3.D3), since it was copied from a formula with relative addresses. Similarly, B4 contains @sum(C4.D4). The display shows

 

| Col B | Col C | Col D | ------|-------|-------|-------| Row 2 | 8 | 3 | 5 | ------|-------|-------|-------| Row 3 | 6 | 4 | 2 | ------|-------|-------|-------| Row 4 | 4 | 1 | 3 | ------|-------|-------|-------|

If you had typed M-C-c B2 RET B3.B4, then B2 is unchanged, B3 contains 8, B4 contains 8, and the display shows

 

| Col B | Col C | Col D | ------|-------|-------|-------| Row 2 | 8 | 3 | 5 | ------|-------|-------|-------| Row 3 | 8 | 4 | 2 | ------|-------|-------|-------| Row 4 | 8 | 1 | 3 | ------|-------|-------|-------|


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.2 Moving Cells and Regions

M-m
This is similar to copy-region, except that the source region is erased after the copy. The two ranges must be the same size. Relative addresses and variables whose ranges are inside the source region are adjusted, as with copy-region. (12) (move-region)

Consider the previous spreadsheet, where B2 contains @sum(C2.D2).

 

| Col B | Col C | Col D | ------|-------|-------|-------| Row 2 | 8 | 3 | 5 | ------|-------|-------|-------| Row 3 | | 4 | 2 | ------|-------|-------|-------| Row 4 | | 1 | 3 | ------|-------|-------|-------|

If we type M-m B2 RET B3, then B2 is empty, B3 contains @sum(C3.D3), and the display shows

 

| Col B | Col C | Col D | ------|-------|-------|-------| Row 2 | | 3 | 5 | ------|-------|-------|-------| Row 3 | 6 | 4 | 2 | ------|-------|-------|-------| Row 4 | | 1 | 3 | ------|-------|-------|-------|


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.3 Deleting

C-k
Delete the current row. With an argument count it deletes several rows. (delete-row) For instance, to delete the row containing the cell cursor, and the next 4 rows, type C-u 5 C-k.
M-k
Delete the current column. With an argument count it deletes several columns. (delete-col) For instance, to delete the column that the cell cursor is in, and the 3 columns to the right, type C-u 4 M-k.
M-C-?
Delete the contents (value, formula, format, etc) of a region. This DOES NOT ask for confirmation. (delete-region)
M-x clear-spreadsheet
This is an extreme action! Erase all the values in the cells, and reset all the heights and widths.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.4 Inserting Rows and Columns

These commands insert blank rows and columns.

C-o
Insert a row above the cell cursor. With an argument count it adds several rows. (insert-row) For instance, to add 5 rows above the cell cursor, type C-u 5 C-o.
M-o
Insert a column to the left of the cell cursor. With an argument count it adds several columns. (insert-column) For instance, to add 4 rows to the left of the cell cursor, type C-u 4 M-o.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4. Style

It is often important to change how the value of a cell is displayed. It is possible to change the height and width of a cell, the font used in a cell, the alignment and protection of a cell, and the formats used to represent numbers. Entire rows and columns can be hidden.

AlignmentAligning cell entries
Formats for numbersFormats for numbers
Cell Height Changing the height of cells
Width of CellsChanging the width of cells
Hidden Rows and ColumnsCreating hidden rows and columns
ProtectionProtecting cells
Fonts (in X11)Working with X11 Fonts


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.1 Alignment

An entry in a cell can be aligned on the left, on the right, or centered. All cells in a region can have their alignment set. The default is left alignment.

M-a a
Change the alignment of the cell under the cursor. The options are def (the default), l (left), r (right), and c (center). (set-cell-alignment).
M-r a
Change the alignment of a region. The options are the same as above. (set-region-alignment).
M-d a
Change the default alignment. The options are l (left), r (right), and c (center). (set-default-alignment).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2 Formats for numbers

Oleo can display numbers in a variety of formats. In addition to sixteen user-defined formats, you can choose from a variety of simple formats. You can set the format for a cell, for a region, and change the default format.

M-a f
Change the format of the cell under the cursor. The options include integer, float, hidden, graph, general.X, dollar.X, comma.X, comma.X, percent.X, fixed.X, exponent.X, where X is an integer from 0 to 14, or the word float. (set-cell-format).
M-r f
Change the format of a region. The options are the same as above. (set-region-format).
M-d f
Change the default format. The options are as above. (set-default-format).

There are some examples following a description of the simple and general formats.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.1 Simple Formats

integer
The number is rounded to an integer before being displayed.

float
The number is displayed in normal, everyday notation, using whatever precision is needed (or fits).

hidden
The number is not displayed. It is recalculated, etc as normal, but the cell is displayed as if it were empty.

graph
The number is displayed as a small graph. If the number is close to zero, it will be displayed as '0', If it is positive, a row of '+'-es is displayed. If it is negative, a row of '-'-es is displayed. For instance, the number 4.234 is displayed as ++++, and the number -5.2 is displayed as -----. If the number has absolute value greater than 70 (13), then a string of 35 #'s is displayed.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.2 General Formats

The following formats require a precision. The precision may be a number from zero to 14, in which case that number of digits will always be displayed after the decimal point (zero-padding or rounding the number as needed), or the precision may be 'float', in which case Oleo will use as many digits as necessary.

general
This uses either normal or scientific notation, depending on the magnitude of the number and the width of the column.

dollar
Positive values are preceeded by '$', (so 3 is displayed as '$3'). Negative values are parenthesized (so -3 is displayed as '($3)'), and all large values have a ',' every three digits (so 1000 is displayed as '$1,000').

comma
This is like the dollar option, but without the '$'. Positive numbers are presented normally, and negative ones are in parenthesis.

percent
The value is multiplied by 100, and is displayed with a trailing '%'. Thus .01 displays as '1%', while 1 displays as '100%'.

fixed
The number is displayed in normal, everyday notation, using the precision specified. 'fixed.float' is the same as 'float'. 'fixed.0' is the same as 'integer'.

exponent
The number is displayed in scientific notation.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.3 StyleExamples

Suppose that a cell contains `1234.567'. If we set the format of the cell to the left hand column, the cell is displayed as in the right hand column:

 
           integer          1234
           hidden
           general.float    1234.567
           general.1        1234.6
           dollar.0       $1,234
           dollar.2       $1,234.57
           comma.1         1,234.6
           percent.0      123457%
           fixed.1          1234.6
           exponent.2        123e+03


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2.4 User Defined Formats

You can define up to sixteen user-defined numeric formats. The current parts of a format are in the table below. We use the definition of the 'dollar' format for an example. (14)

Example:
What it is:
$
What to print before positive numbers.
(
What to print before negative numbers.
What to print after positive numbers.
)
What to print after negative numbers.
$0
What to print if the number is zero.
,
What to print between the thousands and the hundreds, etc.
.
What to print for a decimal point.

0-14
float
The number of digits to print after the decimal point. 'float' means use however many digits are needed, or however many will fit, whichever is less. . .

number
What to multiply the value by before printing. Most often this will be one, but it might be 100 if you're printing percentages, or .000001 if you're printing in megabucks. (Beware of overflow!)

Some advice: do not use digits for the headers, trailers, the comma, or the decimal point symbol. Using digits will confuse the internal routines and produce incomprehensible results. . . (15)


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.3 Changing the height of cells

The height of all the cells in a row is the same. The default height of a row is 1. A row of height 0 is not displayed, but is still updated just as if it were visible. (16)

M-a h
Change the height of the row containing the cell cursor. The options are a non-negative integer, or def. (set-cell-height).
M-r h
Change the height of all cells in a region. The options are the same as above. (set-region-height).
M-d h
Change the default height to a positive integer. (set-default-height).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.4 Changing the width of cells

The width of all the cells in a column is the same. The default width of a column is 11. (17) A column of width 0 is not displayed.

M-a w
Change the width of the column containing the cell cursor. The options are a non-negative integer, or def. (set-cell-width).
M-r w
Change the width of all cells in a region. The options are the same as above. (set-region-width).
M-d w
Change the default width to a positive integer. (set-default-width).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.5 Creating Hidden Rows and Columns

Rows and columns of the spreadsheet can be hidden, so that they do not appear on the screen. They continue to exist, and are updated when necessary. The following hides the third column in a0 mode

 
           M-x set-region-width RET C1 RET 0 RET

or more simply,

 
           M-r w C1 RET 0 RET

This hides the third row in noa0 mode

 
           M-r h RET R3C1 RET 0 RET

If the cell cursor is located at any cell in the third column, then we can hide the third column column:
 
           M-a w  0 RET

Similarly, if the cell cursor is in the fourth row, we can hide the fourth row:
 
           M-a h  0 RET

To make a row visible again, just set its height to some positive value.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.6 Protection

A cell can be protected. For example, if cell E5 is protected, and you attempt to enter data into it, you are not allowed to. Instead, you get the message
 
        Cell C5 is locked.
Moreover, all the cells in a region can be protected. It is also possible to make the default protection "locked", so that all cells are automatically locked.

The default is that all cells are unlocked.

M-a p
Change the protection of a cell. The options are def (the default), p (protect, or lock), and u (unprotect, or unlock). (set-cell-protection).
M-r p
Change the protection of a region. The options are the same as above. (set-region-protection).
M-d p
Change the default protection. The options are p (protect, or lock), and u (unprotect, or unlock). (set-default-protection).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.7 Fonts (in X11)

The default cell font is 12 point times-roman. The easiest way to specify a font is to use one of the built-in short-hand names. These names are `fixed', `times', and `courier'. Optionally, these names can be followed by a scale. The scale is the ratio of the default point size to the desired point size. For example, if the default font is a 10 point font, then `times 1.2' refers to a 12 point Times-Roman type font.

M-a o
Use this command to set the font in a cell. For instance, to set the current cell to `times-roman' at 24pt, type
 
        M-a o times RET 2.0  RET
Since the default size is 12pt, the 2.0 magnification factor makes the size 24 points. (set-cell-font)

M-r o
Use this command to set the font in a region. For instance, to set the range `A1.E3' to `courier' at 12pt, type
 
        M-r o courier RET 1.0   RET
(set-region-font)

M-d o
Use this command to set the default font. For instance, to set the range `A1.E3' to `fixed' at 12pt, type
 
        M-r o fixed RET 1.0  RET
All cells whose font has not been specified have the default font, so changing this will change the font in the entire spreadsheet. (set-default-font)

M-x set-default-point-size
Set the default point size. To set the default point size to 10, type
 
        M-x set-default-point-size RET 10  RET
(set-default-point-size)

M-x define-font-name


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5. Multiple Windows

Oleo can split a spreadsheet into two or more windows. The windows showing the spreadsheet can show different parts of it. Only one spreadsheet can be displayed at a time.

WindowsIntroduction to Oleo windows.
Split WindowNew windows are made by splitting existing windows.
Other WindowMoving to another window or doing something to it.
Change WindowDeleting windows and changing their sizes.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.1 Concepts of Oleo Windows

At any time, one of the windows is the selected window. The cell cursor is located in this window. Each other window has a location of point as well, but since the terminal has only one cell cursor there is no way to show where those locations are.

Commands to move the cell cursor affect the cell cursor for the selected Oleo window only. They do not change the value of the cell cursor in any other Oleo window.

When there are multiple windows, they can have different regions, because they can have different values of the cell cursor.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.2 Splitting Windows

C-x 2
Split the selected window into two windows, one above the other (split-window-vertically).
C-x 5
Split the selected window into two windows positioned side by side (split-window-horizontally).

The command C-x 2 (split-window-vertically) breaks the selected window into two windows, one above the other. Both windows start out displaying the cell cursor in the same position. By default the two windows each get half the height of the window that was split.

C-x 5 (split-window-horizontally) breaks the selected window into two side-by-side windows.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.3 Using Other Windows

C-x o
Select another window (other-window). That is o, not zero.
M-C-v
Scroll the next window (scroll-other-window).

To select a different window, use C-x o (other-window). That is an o, for `other', not a zero. When there are more than two windows, this command moves through all the windows in a cyclic order, generally top to bottom and left to right. After the rightmost and bottommost window, it goes back to the one at the upper left corner. When the minibuffer is active, the minibuffer is the last window in the cycle; you can switch from the minibuffer window to one of the other windows, and later switch back and finish supplying the minibuffer argument that is requested.

The usual scrolling commands apply to the selected window only, but there is one command to scroll the next window. C-M-v (scroll-other-window) scrolls the window that C-x o would select.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.4 Deleting and Rearranging Windows

C-x 0
Get rid of the selected window (delete-window). That is a zero.
C-x 1
Get rid of all windows except the selected one (delete-other-windows).

To delete a window, type C-x 0 (delete-window). (That is a zero.) The space occupied by the deleted window is given to an adjacent window. Once a window is deleted, its attributes are forgotten.

C-x 1 (delete-other-windows) is more powerful than C-x 0; it deletes all the windows except the selected one (and the minibuffer); the selected window expands to use the whole frame.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6. Options

Oleo has various options. They can be set as a default in the `.oleorc' file, or using the command M-x set-option. To see all the current options, type C-h o.

AppearanceChanging Oleo's appearance
Window OptionsOptions for the active window
Other OptionsOther Options


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.1 Changing Oleo's appearance

a0
In a0 mode, Oleo uses {letters}{digits} style cell-references, like some popular spreadsheets.

noa0
In noa0 mode, Oleo uses R{digits}C{digits} style references, like some other popular spreadsheets. (Default)

status
This option controls which line on the screen is used for displaying the status of the current cell. The number may be positive, (counting down from the top), negative (counting up