Next |
GNOME Documentation Project
Copyright © 2003 Kevin Breit, Adrian Custer, Ray Dassen, Jody Goldberg, Andreas J. Guelzow, Jon K. Hellan, Jukka-Pekka Iivonen, Alexander Kirillov, Charles Twardy.
Copyright © 2002 Jody Goldberg, Andreas J. Guelzow, Wayne Schuller, Adrian Custer, Kevin Breit, Aaron Weber, Alexander Kirillov, Eric Baudais, Gregory Leblanc.
Copyright © 1998, 1999, 2000, 2001 Miguel de Icaza, Thomas Canty, Jukka-Pekka Iivonen, Almer S. Tigelaar, Morten Welinder.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License (GFDL), Version 1.1 or any later version published by the Free Software Foundation with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. You can find a copy of the GFDL at this link or in the file COPYING-DOCS distributed with this manual.
This manual is part of a collection of GNOME manuals distributed under the GFDL. If you want to distribute this manual separately from the collection, you can do so by adding a copy of the license to the manual, as described in section 6 of the license.
Many of the names used by companies to distinguish their products and services are claimed as trademarks. Where those names appear in any GNOME documentation, and the members of the GNOME Documentation Project are made aware of those trademarks, then the names are in capital letters or initial capital letters.
DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT ARE PROVIDED UNDER THE TERMS OF THE GNU FREE DOCUMENTATION LICENSE WITH THE FURTHER UNDERSTANDING THAT:
DOCUMENT IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS FREE OF DEFECTS MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY, ACCURACY, AND PERFORMANCE OF THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS WITH YOU. SHOULD ANY DOCUMENT OR MODIFIED VERSION PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL WRITER, AUTHOR OR ANY CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER; AND
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE AUTHOR, INITIAL WRITER, ANY CONTRIBUTOR, OR ANY DISTRIBUTOR OF THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER DAMAGES OR LOSSES ARISING OUT OF OR RELATING TO USE OF THE DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES.
To report a bug or make a suggestion regarding the Gnumeric application or this manual, follow the directions in the GNOME Feedback Page.
Title | Date | Author | Publisher |
---|---|---|---|
Gnumeric Manual: Version 1.2 | September 2003 | GNOME Documentation Project | |
Gnumeric Manual: Version 1.0 | January 2002 | GNOME Documentation Project | |
Gnumeric Manual: Earlier Versions | 1998-2001 | GNOME Documentation Project |
This manual describes version 1.2 of Gnumeric.
Next Contents |
Previous | Next |
Table of Contents
Previous About This Document | Next Welcome! |
Previous | Next |
Gnumeric is a spreadsheet, a computer program to manipulate and analyze numeric data. Gnumeric intends to be the best spreadsheet available anywhere. It has been developed over many years to become fully mature and mathematically correct. Gnumeric was created and is maintained by the GNOME project. This manual describes version 1.2 of Gnumeric .
Gnumeric aims for:
Stability :
Gnumeric has undergone significant amounts of testing. A diverse group of users evaluates gnumeric in a wide variety of environments. Testing workbooks are used to assess the mathematical correctness of the calculations and to validate the quality of the file importers. This release can be considered safe for use in a production environment.
File compatibility :
Transparent access and manipulation of files from other applications is vital in a modern office. The gnumeric file format is simply compressed XML which can be decompressed into text. Gnumeric can open files from several well known proprietary and free spreadsheets including MS Excel (tm), Lotus 1-2-3 (tm), Applix (tm), OpenOffice.org, Psion, Sylk, XBase, Oleo, PlanPerfect, Quattro Pro and HTML. Gnumeric can save files to several versions of the MS Excel (tm) file format and can save tables into LaTeX \longtable, HTML, and roff files. Gnumeric also benefits from a highly configurable text importer and exporter which ensures that data can be transfered smoothly. New formats can easily be added in plug-ins.
Minimal cost of transition :
Learning new and unfamiliar interfaces is an expensive and frustrating process. Gnumeric attempts to offer optional extensions and enough compatibility that a user's familiarity with other applications will still apply.
Sufficient feature set :
While people quote the statistic that most users only need 20% of the features of the software they use, this statistic does not mean that only 20% of the features are needed. Most users share a common 10% but require distinct features for the rest of their work. Implementing enough of the features to support day to day use by the average spreadsheet user has taken time. Gnumeric attempts to provide full implementations of the features it offers, leaving features unimplemented until a robust and complete implementation exists.
Internationalization :
Gnumeric has been translated into 40 languages, and is being used by people around the globe with the symbols appropriate for their local setting.
Openness and Scalability :
Gnumeric is free software released under the GNU GPL. The core architecture is designed to ensure that it can comfortably scale to moderately large loads (1 million cells) while remaining usable on older hardware. The availability of clean, reasonably documented, source code makes it simple to modify the spreadsheet, write custom routines or extend Gnumeric for special needs.
These features of Gnumeric make it versitile and powerful. The screenshot of Gnumeric show in Figure 1.1, “An example of what Gnumeric can do.” demonstrates some of the features currently available.
Gnumeric currently supports a full complement of calculation functions, formattting options, graph types and drawing options.
The new features of Gnumeric 1.2 :
The newest version of Gnumeric includes numerous improvements over the versions in the 1.0 series.
Improved Analytics :
This version of Gnumeric includes 450 sheet functions including all of the functions from the North American edition of Microsoft Excel 2000 (TM). This version also includes numerous new functions and statistical routines imported from the R statistical language, from the GNU Scientific Library, and from other sources. The random number generation has been updated to include Beta, Cauchy, Chi-Squared, Exponential power F, Gamma, Geometric, Laplace, Levy alpha-Stable Logarithmic, Logistic, Log-normal, Pareto, Rayleigh Rayleigh tail, T, Type I Gumbel, Type II Gumbel, Weibull Gaussian Tail, Landau, and Uniform integer distributions. The derivative valuation routines have been expanded to include Black-Scholes (and sensitivities), Garman Kohlhagen, Merton Jump Diffusion process, Bjerksund and Stensland (American options), Forward Starts, Simple and Complex Choosers. The solver has been improved with new linear and quadradtic programming routines.
Improved File Import and Export :
The ability to import and export files of different formats has been greatly improved. Gnumeric now supports Applix, Excel 1997, 2000 and XP formats (possibly encrypted), Lotus, OpenOffice, Plan Perfect, and Quattro Pro. These file tools have been made more robust by using the GNOME Structured File library.
Improved Graphing :
The earlier versions of Gnumeric relied on the Guppi program for graphing. This has been changed in the current version which uses a newer framework for the production of graphs. This newer framework should provide quicker graphs and will be a better platform for future development.
Improved Structure based on GTK 2.0 :
This version of Gnumeric is based on the second version of the Gimp Tool Kit (GTK+), the basic libraries of computer code used to build GNOME applications. This second version improves on the first and provides a sound basis for future programming. Users will benefit greatly from this second version of the GTK+ libraries. Gnumeric is now able to produce characters from a much larger range of languages, has improved icons, is better integrated with GNOME and has other visual improvments like anti-aliased fonts. Gnumeric can also now be used without problem on a machine with several screens. The transition to GTK+ 2.0 has also greatly improved performance.
For more details on the changes in Gnumeric, refer to the file named NEWS in the source code distribution.
Known Issues in the Gnumeric 1.2 release:
Issues which cannot be fixed immediately will be added to this list as they are discovered.
Previous Contents | Contents | Next How to Use this Manual |
Previous | Next |
There are several ways to use this manual. The simplest is to read sequentially through the manual. A quicker way to find the answer to a particular question might be to read the explanation for the organization of the manual which is presented below and then go directly to that section.
The chapters of this version of the Gnumeric manual are organized as follows:
Chapter 3, A Quick Introduction: A Quick Introduction
This chapter of the manual explains the fundamentals of spreadsheets in general and of Gnumeric in particular. The chapter attempts to help new users get started with Gnumeric and provides background for the more detailled explanations in the rest of the manual.
Chapter 4, The Elements of Gnumeric: The Elements of Gnumeric
This chapter describes all of the pieces of Gnumeric which a user can manipulate. The chapter provides explanations for each of the menus, menu entries, toolbar buttons and other elements of the graphical user interface.
Chapter 5, Working with Data: Working with Data
This chapter explains the core functionality of Gnumeric including the basic types of data manipulated by Gnumeric, the methods of entering, altering and formating data, and the basic tools for analysis of these data. More advanced analysis is described in Chapter 6, Advanced Analysis.
Chapter 6, Advanced Analysis: Advanced Analysis
This chapter explains many of the advanced analytic tools available in Gnumeric including statistical analysis, linear algebra calculations and simulation analysis.
Chapter 7, Graphics: Plots, Images and Drawings: Graphics: Plots and Drawings
This chapter explains how to use Gnumeric to add graphical elements to a worksheet. Data plots allow users to create charts of data in a worksheet including pie charts, bar and column charts and scatterplots. Drawings allow users to add simple graphical elements on top of a worksheet including lines, arrows and simple polygons.
Chapter 8, Managing and Viewing Worksheets: Manging and Viewing Worksheets
This chapter explains how to manage worksheets and manipulate the view of the worksheet contents.
Chapter 9, Workbook Settings: Workbook Settings
This chapter explains the contents of a Gnumeric workbook which are not part of the worksheets. This includes several settings which apply to the workbook and are saved in the Gnumeric file. Settings which apply to the Gnumeric program itself are called `preferences' and are explained in Chapter 10, Configuring Gnumeric.
Chapter 10, Configuring Gnumeric: Configuring Gnumeric
This chapter explains how to change the default behaviour of Gnumeric including the startup behaviour and default locale (language and number display).
Chapter 11, File Opening and Saving: File Opening and Saving
This chapter explains how to use files in Gnumeric including how to save the current file, how to change the file format of saved files and how to open files from a different format.
Chapter 12, Printing: Printing
This chapter explains how to print spreadsheets, tables and plots from Gnumeric to a printer directly or into Postscript or PDF (both are page description languages).
Chapter 13, Getting Help from Other Sources: Getting Help from Other Sources
This chapter describes other sources of help which are available to users including the Gnumeric web site, the mailing list, and the internet relay chat (IRC) discussion channel. The chapter also explains how to tell the project about a problem with the program.
Chapter 14, Extending Gnumeric: Extending Gnumeric
This chapter explains how to go about extending Gnumeric to provide extra functionality. Because Gnumeric is Free Software this is quite easy to do.
Chapter 15, About Gnumeric: About Gnumeric
This chapter provides some background information on the creation and distribution of Gnumeric.
Appendix A, Function Reference: Function Reference
This appendix provides a list of all the functions which are currently defined in Gnumeric.
Appendix B, Keybinding Reference: Keybinding Reference
This appendix lists the keyboard shortcuts which are defined by default in Gnumeric.
Previous Welcome! | Contents | Next A Quick Introduction |
Previous | Next |
This chapter of the manual explains the fundamentals of spreadsheets in general and of Gnumeric in particular. The chapter attempts to help new users get started with Gnumeric and provides background for the more detailled explanations given in the rest of the manual.
Previous How to Use this Manual | Contents | Next Getting Started Using Gnumeric |
Previous | Next |
The best way to learn how to use Gnumeric is to begin exploring the program yourself. This section will help you get started trying new things and seeing what happens.
Unfortunately, this manual cannot teach you the very basics of interacting with a modern computer. If you have never used computers, don't know the names of the hardware components (the pieces you can touch) or don't know the names of the elements you see on the screen (like windows or the mouse pointer), you will probably want to get some basic advice from someone you know or read the manuals which came with your machine or your operating system. It's all pretty easy but, in order to understand this manual, you will kneed to know some basic terminology and have some basic computing skills. For an introduction to the GNOME desktop environment, see the GNOME User Guide.
Previous A Quick Introduction | Contents | Next Starting Gnumeric the First Time |
Previous | Next |
Gnumeric can be started in several ways depending on the type of desktop you have. All of these approaches result in a gnumeric window appearing on your monitor.
![]() | Note |
---|---|
It is assumed that you have installed the Gnumeric program on your machine. Installing Gnumeric depends on the particular operating system and distribution and is therefore beyond the scope of this manual. If Gnumeric is not installed on your machine, read the manuals that came with your distribution or look at your distribution vendor's website. |
If you are a GNOME user, you should have a `panel' somewhere on your desktop. This panel contains icons, and at least two menus. One of these menus is called Applications and has an icon which looks like the outline of a foot. If you click on this menu name, a menu will appear. Drag the cursor down to the Office sub-menu name, and a submenu will appear. Drag the cursor into the submenu and then release the mouse button when the cursor is on the entry which reads "Gnumeric Spreadsheet." This will start the program and the main window of Gnumeric will appear as shown in Figure 3.1, “The Gnumeric spreadsheet when first opened.”
If you use GNOME as part of a distribution, the "Application" menu
may have a different name. In that case you should hunt around the
menus until you find something named "Gnumeric" with the
[D]
If you don't use GNOME, your desktop may have its own menus and you can try to find an entry which will start Gnumeric.
Gnumeric can also be started from the command line in an xterm window or equivalent terminal emulator. Open a terminal, and, at the shell prompt type:
gnumeric &
which will start the program and send it into the background.
If you are still stuck, ask a friend or someone who knows your machine. Unfortunately, getting started is often the hardest part of learning to use a new program but it is also the one place a manual such as this one cannot really help.
Gnumeric can also be opened using a spreadsheet file directly. If there is a spreadsheet file on the desktop or in a file manager like Nautilus, it may be possible to click or double-click with the mouse pointer on the file and have Gnumeric open the file automatically.
Previous Getting Started Using Gnumeric | Contents | Next Working with Gnumeric |
Previous | Next |
After opening, Gnumeric appears as was shown in Figure 3.1, “The Gnumeric spreadsheet when first opened.”. The open application contains a menubar at the top, two toolbars below the menu bar, and below these, on the left, the object toolbar, and, on the right, the data entry area above the cell grid area which itself is above the list of worksheets and the information area. For a detailed explanation of each of these elements, see the section called “Overview of the Elements of Gnumeric”. By default, Gnumeric opens a workbook with three worksheets and a file name of Book1.gnumeric.
Using a spreadsheet generally involves several steps. First the application is started to obtain an empty workbook, which generally has several empty worksheets. Next, data and formulas are entered into one or several sheets. The data may be entered by hand or imported from external files. The formulas are generally entered by hand, possibly with the help of various tools. The data may be formatted to appear in particular ways and to clarify the structure of the data in the worksheet. A user may also create several graphical plots. Certain parts of the spreadsheets may be printed out as tables. The work is then usually saved into a file which can be re-opened later to add or modify the contents of the workbook.
![]() | Note |
---|---|
The terminology can be confusing. A spreadsheet file contains a workbook and possibly some other information about the file. (Because the workbook is far more important than the extra information, files are often called workbooks.) A workbook contains one or more worksheets. Each worksheet contains a lare number of cells usually arranged into a two dimensional grid made up of columns and rows. |
Previous Starting Gnumeric the First Time | Contents | Next Using Commands |
Previous | Next |
The commands provided by Gnumeric can be accessed using several methods. These methods are explained here. The most important commands are explained in the rest of this chapter. All of the commands are explained in later chapters of this manual.
The menus provide the simplest way to get to all of the commands provided by Gnumeric. These menus work like those in any GNOME application: clicking on the menu name causes a menu to open, dragging the mouse cursor onto the menu and then releasing the mouse button (or clicking again) while the cursor is above a menu entry causes that command to be exectuted. For further information, see the section called “Introduction to Menus”.
The buttons on the toolbars are quite simple to use. Simply placing the mouse cursor above one of the buttons and pressing the left mouse button will perform the command, either directly or by opening a dialog window. For further information, see the section called “The Gnumeric Toolbars”.
In many situations, Gnumeric provides a menu right under the mouse cursor if the right hand mouse button is clicked. This menu contains different entries depending on the placement of the mouse cursor when the right hand mouse button is clicked. For further information, see the section called “Context Menus in Gnumeric”.
Certain common commands can be triggered using a combination of keys. The menu entries are often followed by a combination of keys which can be used to trigger that command. For instance, saving the file which is currently being used can be performed by typing jointly the control key and the s key (i.e. Ctrl+S). For further information, see the section called “Gnumeric Keybindings”.
Previous Working with Gnumeric | Contents | Next Data in Gnumeric |
Previous | Next |
The main purpose of spreadsheets like Gnumeric is to collect information in a coherent manner, perform calculations on the information and then be able to update those calculations easily if the original numbers change. The use of a spreadsheet therefore requires a substantial understanding of the types of information which can be entered into the spreadsheet and the methods which can be used to manipulate that information. This section explains how data can be used in Gnumeric.
Spreadsheets like Gnumeric treat information by separating the data into separate cells and considering the data in each cell to be separate elements. Each cell in the spreadsheet has both a value, which is what Gnumeric manipulates, and a representation, which is what is actually shown. Understanding this distinction is complicated and make take the new user some time. This distinction is one of the reasons spreadsheets are so useful.
The cells of the spreadsheet are contained in the cell grid area. The cell grid area is the area with a white background and grey grid lines. The grid lines separate this area into separate cells. Each cell has a unique reference name which is the combination of the letters of the name of the column and the number of the row. For instance, the top, leftmost cell is the cell named "A1" and the cell two over to the right and four rows down is named "C4" because it is in the column labelled "C" and in the fourth row. Each of these cells can contain only one single datum.
The datum contained in any cell will have one of five types: a text string type, a number type, a formula type, a boolean type or an error type. These five types of data values can then have various display formats so that, for instance, a number value can be displayed as a number, a monetary amount, a date or a time. Text strings are sequences of characters and punctuation marks and could, for example, contain textual information such as peoples names. Number values are simply numbers but may be input and displayed in various formats including decimal numbers, dates, times, and numbers in scientific notation. Formulas are instructions to Gnumeric to calculate a result. The power of spreadsheets comes from these formulas because the results of the calculation can depend on the contents of other cells. Boolean values are either TRUE or FALSE and can be used in logical statements. Error values are usually the result of mistakes or impossible calculations.
For more advanced information on the types of data usable in Gnumeric, see the section called “The Types of Cell Elements”.
In order to enter data into the spreadsheet, the user must first select a cell in which to place the information and then actually type the information on the keyboard. Once the information is entered, Gnumeric attempts to figure out both the appropriate data value type to assign to the cell and the appropriate data format in which to display this data value. Because this process is quite complex, users may occasionally be forced to actively select these parameters of the cells, which is explained in the section called “Cell Formats” below. The next two sections explain how to get data into a cell, first by moving the selection box to a desired cell and then by typing the data.
In order to enter data into Gnumeric the selection box must be placed over the appropriate cell. The selection box appears on the cell grid as a double lined rectangle with a small grey square in the lower right corner of the box. By default the selection box surrounds the top, leftmost cell in the cell grid area.
The simplest way to move the selection box is to use the mouse. If the mouse cursor is placed over the cell "C3" (the cursor will be represented as a thick white cross) and the left mouse button then clicked, the selection box will move to cell "C3". Note that the selection box can cover more than one cell if the mouse is dragged while being clicked. The use of these larger selections is explained below in the section called “Complex Cell Selections”.
![]() | Tip |
---|---|
The selection box also causes the header of the column and row to change slightly. The headers will turn a darker shade of gray and the font of the letters and numbers turn bold. This helps indicate what is currently being selected. |
The selection box can also be moved with the keyboard arrow keys. For instance, typing the right arrow twice and the down arrow once will move the selection box from the cell "C3" to the cell "E4".
The selection box can be moved in other ways and will move in response to certain actions. These movements become intuitive after using Gnumeric for a little while.
In order to enter data into a selected cell, one can simply start typing. The characters will then become part of the spreadsheet when the selection is changed either by typing the Enter key, which moves the selection down one cell, by typing the Tab key, which moves the selection one cell to the right, or by selecting any other cell with the mouse.
For example, the mouse could be used to select the cell four columns over (Column D) and three rows down (Row 3). Then the user could type "Hello, this is a line of text." and then type the Enter key. The text would then appear in cell "D3" and, if the cells to the right are empty, would span into those cells so that the whole entry is visible. The selection box moves when the Enter key is typed and will therefore appear afterwards in cell "D4", ready for the input of more data.
![]() | Note |
---|---|
Note that as the data text is entered it appears in both the cell and in the data entry area (the area below the toolbars to the right of the equals (=) sign). |
Mistakes which are made during data entry can be corrected by using the Backspace key or the Delete key. Finer control can be obtained if the cursor is moved to the text entry area by clicking in the box to the right of the equals (=) sign with the mouse. Editing in the text entry area enables the arrow keys to navigate backwards and forwards within the text being entered and also enables the mouse to be used to move the cursor.
The contents of a cell can be changed simply by selecting the cell again and either typing the new contents or editing the existing contents of the cells.
![]() | Note |
---|---|
If the content of the cell is too large for the size of the cell, the entry may span over the edge of the cell into the empty cells to the right. If the cell is a number, the cell grid area may display hash marks (######) to indicate the cell has content which is too large to display in the given cell width. |
As data are entered into the spreadsheet, Gnumeric interprets the information in order, first, to assign it to a data category and, second, to give it an appropriate data display format. The entry will be assigned to one of the basic data types and possibly to a sub-type. Entries which start with an apostrophe (') are considered to be text no matter what the rest of the contents. Entries which start with an equals sign (=) are automatically considered to be a formula. Entries which are single numbers or which fall into commonly used patterns for dates or times will be considered to be numbers.
Gnumeric usually figures out correctly both the type and the appropriate display format for the data being entered. Occasionally, the user will have to force Gnumeric to consider the data to be a different data type than Gnumeric would guess by default. The details of this process is explained in greater detail in the extended chapter on data, Chapter 5, Working with Data.
Entering text simply requires selecting the appropriate cell, typing the text and then the Enter key. If the text is too large to fit in its own cell, and the cell to its right is empty, the text will span into the cell on the right. By default, Gnumeric uses a display format for text in which the contents are shown left justified.
For more information about text elements, see the section called “Text Data Elements”.
Entering numbers requires selecting the appropriate cell, typing in a number and then the Enter key. Gnumeric recognizes several types of information to be numbers.
The simplest kind of input which Gnumeric recognizes as numbers are standard numeric values. Technically, these are contiguous sequences of digits which may have a separator symbol between the thousands and another symbol indicating the decimal separator. These symbols follow the English convention by default (comma as thousand separator, period as decimal symbol) but will adopt the symbols appropriate for a different locality if Gnumeric is launched in a particular way. For instance, in a French setting the period is the thousand separator symbol and the comma the decimal separator symbol. By default, Gnumeric will display these numeric values lined up against the right side of the cell.
Several other types of input are recognized as numeric values which means that calculations can be performed on the values in the cells.
Dates in the standard format of the locale are recognized as numbers. By default, inputing 11/21/1970 will be recognized as the twenty-first of November of the year nineteen seventy. Gnumeric stores the value as the number of days since the first day of January in 1900.
Time values, such as 10:34 or 11:23:45 PM, are recognized as number values. These values are stored in Gnumeric as fractions of the whole day.
Percentage values can be input simply by appending the percent symbol (%) to the value.
Fractions can be input and are recognized as values.
Numeric values can be input using scientific notation. For instance, 1.003e+6 will be recognized as the value one million three thousand.
For more information on numbers, see the section called “Number Data Elements”.
Entering boolean values requires selecting the appropriate cell, typing in either "TRUE" or "FALSE" and then the Enter key.
Entering a formula requires selecting a cell and typing in the equals sign (=) and then a valid formula. If Gnumeric cannot understand the formula which is entered, it will open a dialog box which may have an explanation and gives the user a chance either to re-edit the expression or to accept the entry as a text entry instead of a formula. The second choice makes it easy to re-edit the entry into a valid formula simply by fixing the formula and removing the leading apostrophe (') before the equals sign.
Formulas can be quite complex since the power of spreadsheets comes from these formulas. A simple example of the use of a formula is as follows: first, select cell B2 and input the value "3" into that cell. Second, select cell D4 and input (without the quotes) "=B2+2" and then type the Enter key. Cell D4 should display the value "5". If the value of cell B2 is changed from "3" to "100", Gnumeric will automatically update the value of cell D4 to "102".
A valid formula can be a simple arithmetic equation such as
=3+4-1
which uses a formula to make the cell equal to the value 6.
Formulas may include calls to functions. These are statements which indicate that more complex operations should be performed. For instance, a formula could be "=EXP(24)" which would give the value of e (the base of the natural logarithm) raised to the 24th power. The cell would then display "2.6489e+10".
As was shown in the example above, formulas may contain `references' to the contents of another cell. In the example given above, the contents of the cell in the second column and the second row was used in a calculation by using the cell name "B2". These references mean that complex calculations can be automatically updated when one of the original values change.
References can be made to the cells in other worksheets and even to those in other workbooks (files). The basic format of a complete reference is made of the name of the file the reference is in, enclosed by square brackets, followed by the name of the sheet, followed by an exclamation point, followed by the letters of the column, followed by the number of the row. For example, a complete reference could be "[my_file.gnumeric]"Sheet3"!C3". These complete references can be shortened if the filename or sheet names are the same as that of the reference. "AE34" would refer to the cell in the current file, in the current worksheet which is in column "AE" and in row "34".
References can refer to a range of contiguous range of cells. For instance, the reference "A1: E5" refers to all the cells from the top-left most cell of the current sheet to the cell five rows down and five rows over. This can be useful in a formula which uses a function such as MAX(). The formula "=MAX(A1:E5)" would display the value of the largest number value in this range of cells.
For more information on references see the complete discussion in the section called “Cell Referencing” later on in this manual.
For a more discussion of the use of formulas see the section called “Formula Elements” later in this manual. For a list of the functions available, see the function reference appendix, Appendix A, Function Reference, or click on the toolbar button with the symbol "f(x)" on it for an organized list of functions.
Previous Using Commands | Contents | Next Cell Formats |
Previous | Next |
The data in Gnumeric are stored in the cells of the spreadsheet, each of which has a cell format which dictates how the data will be displayed, whether the cell will have borders and other information. Cell formatting can be quite confusing at first because it combines simple changes, such as the colour of the characters being displayed, with more complex ideas, such as how future changes to the cell will be interpreted.
All of the cell formatting commands can be reached through a context menu by right clicking on a cell and selecting the Format Cells... menu entry. This will open a dialog window with tabs which group together similar types of formatting. Clicking on the Font tab allows a user to change the font famly, style, size and colour. For instance, if the cell B2 contained the text "Hello, this is my first spreadsheet" then this text could be made bigger by selecting a larger font size.
Simple changes to the format of a cell include changing the alignment of the characters, changing the font type or colour, changing the border, and changing the colour or pattern of the background.
The Alignment, Font, Border, and Background tabs are simple to understand simply by playing around with the settings and looking at the effect on a cell which contains text.
The Protection and Validation tabs are advanced functionality which can be ignored at the begining. For explanations of these tabs, see the advanced description in the section called “Validation Tab”.
Cell formats are most difficult to understand when they address the type of data stored and the visual display of that data. This only arises with the options selected in the Number tab of the Format Cells dialog. While these ideas are complex, they must be understood at the beginning because they are fundamental to spreadsheet use.
When data are entered into Gnumeric, the spreadsheet interprets the entry based on the input format of the cell. The default format of empty cells is the General format which instructs Gnumeric to guess both the type of the data being entered and a suitable display format for that data type. However, the General format can be changed to a specific format in order to alter both the way Gnumeric interprets any future data input to the cell and the way data in the cell are displayed.
![]() | Note |
---|---|
Changing the format does not alter the data type of data already in a cell but does alter the display format of that data. This means that the input format will only affect future input whereas the display format will affect both the data currently in the cell and any data placed later into the cell. |
For example, if a user enters "12/25/2000" (without the quotes), Gnumeric guesses that this is a date and stores the value 36885. (The value Gnumeric uses for dates is the number of days since the last day of 1899. However, Gnumeric perpetuates an error of Excel for the sake of compatibility and assumes 1900 to be a leap year even though it was not.) At the same time, Gnumeric changes the display format to display this number as a date, with a numeric month, day and year, separated by slashes.
![]() | Important |
---|---|
The order in which the formatting operations occur is critical. It is not possible to alter the type of a datum currently in a cell by formatting. To alter the intrepretation of the data type in a cell, formatting must occur prior to the entry of the data. |
It sometimes becomes necessary to override the "General" type if Gnumeric is making an incorrect assessment of the data being entered. Postal Zip Codes in the United States, for instance, are incorrectly interpreted to be numbers. Some of these Zip Codes start with a leading zero which the "General" format type drops so the user must intervene to keep that zero displayed. In order to input these Zip Codes, the following steps must be performed. First, the cell must be selected. Next, the cell must be formatted to hold a "Text" value. This formatting changes both the interpretation of any future data entry into this cell and alters the display formatting of the cell. Finally, the Zip Code can be entered. Following these steps, the data value will be considered to be a "Text" value, any leading zeros will be retained and the data will be left justifed since this is the default display format for "Text" values.
![]() | Tip |
---|---|
If the data type of a whole column needs to be altered prior to data entry, this can be done in one formatting operation. First the whole column must be selected by clicking on the column header (the letters at the top). Next, the selected cells can be formatted at once by clicking the right mouse button to obtain the context menu or by selecting the Format menu and the Cells... menu entry. This quick approach to pre-formatting cells can also be done for any group of selected cells. |
Previous Data in Gnumeric | Contents | Next Complex Cell Selections |
Previous | Next |
Selections can be more complex than a single cell at a time. Selections may describe a continuous rectangular block of cells, an arbitrary shaped group of cells or even a discontinous group of cells.
The most common way to select a continous rectangular block of cells uses a click and drag mouse motion. The cells in this continous block can be selected by clicking and holding the left mouse button down on one of the corner cells (for instance, the top, leftmost cell) and dragging the mouse cursor to the opposite corner (for instance, the bottom, rightmost cell) before releasing. The selection box will expand to include all of the cells in this range.
The most common way to select an arbitrary shaped or discontinous group of cells is to hold down the Ctrl key while using the mouse to select cells. As long as the Ctrl key is held down, all of the cells included by a click or a click and drag motion will be added to the selection.
![]() | Note |
---|---|
There are several operations which cannot be performed with odd shaped or discontinous groups of cells. |
For more information and other ways to select multiple cells, see the complete discussion in the section called “Selecting Cells and Cell Ranges”.
Previous Cell Formats | Contents | Next Moving Cell Contents, Inserting New Cells or Deleting Cells |
Previous | Next |
The contents of cells, both data values and formatting, can be moved from one part of a spreadsheet to another so that data do not have to be re-entered if the spreadsheet is reorganized. New cells can be added to a spreadsheet and old cells removed but these latter operations cause the layout of the spreadsheet to be altered.
The simplest way to move cell contents around a spreadsheet involves selecting a block of cells containing the contents to be moved, either "cutting" or "copying" those cells, selecting the location where these contents are to be moved and then pasting the data.
Moving data can only be performed with a single selection of cells which means that only continous rectangular blocks of cells can be moved. This does mean, however, that columns or rows can be moved as a unit. By default, Gnumeric moves the entire contents of the cells including both the data values and the formatting of the cells.
Once a group of cells is selected, they can be "cut" or "copied" either using the Edit menu, the toolbar buttons (a pair of scissors or two pieces of paper, respectively), the right mouse button context menu or keyboard shortcuts (Ctrl+X or Ctrl+C respectively). If cells are "cut" the contents will be removed from the current location. If cells are "copied", the contents will be duplicated in the new location. These two operations treat cell references in formulas slightly differently. If cells are "cut", any references in the cells in the new location will remain pointed at the original cells. If cells are "copied", the references in the cells in the new location will point to cells in the same relative position.
The new location for the cells can be selected in two ways. The simplest is to select the top, left cell of the new location. Alternatively, the whole new range of cells can be selected but the shape of this new range must match exactly the dimensions of the original range which is more difficult.
Finally the cell contents can be "pasted" in the new location using either the Edit menu Paste menu entry, the toolbar button with a clipboard, the context menu Paste menu entry or the Ctrl+V keyboard shortcut.
An alternative way to move cells in a current worksheet involves dragging and dropping the original selection. The cells to be moved are selected as above. The mouse cursor is then placed on the thick white selection border. If the left hand button is clicked and held, the selected cells can be dragged to a new location resulting in the same operation as a "cut" and a "paste". If the Ctrl key is held down during the click and drag of the mouse, the result is the same as a "copy" and "paste" operation and can be repeated several times.
Both the Edit menu and the context menu have an extra menu entry called Paste Special... which can be used during a cut and paste operation to seletively transfer some of the original the cell contents or to alter the contents in specific ways. This option allows the transfer of only the cell contents, only the cell formats or only the calculated values of the cells. The transfered contents can also be mathematically combined with the current contents of cells in the new location. Alternatively, the selection can be transposed. See the section called “Paste Special” for more information on the Paste Special... command.
A worksheet can also be altered by inserting or by deleting cells. These operations actually alter the locations of cells in a workbook.
Inserting and deleting columns and rows are easy to understand. If a group of columns or rows is selected, selecting the Column or Row menu entries in the Insert menu will add the same number of columns to the left of the selected columns or of rows above the selected rows. The context menu can also be used for the insert operation. The context menu can be used to delete the currently selected columns or rows.
![]() | Warning |
---|---|
Insert operations can result in the loss of data if the last columns or rows currently contain information. |
Individual cells or contiguious rectangular blocks of cells can also be inserted and deleted. During this operation, the user is asked which way to shift the current cells to allow the insertion or deletion of the selected cells. The movement can be along the rows or along the columns and will result in the relative movement of cells which were previously contiguous. This shift is the fundamental difference between insert and delete operations compared to cut or copy and paste operations.
Previous Complex Cell Selections | Contents | Next Sheets |
Previous | Next |
The worksheets in a workbook can be altered in several ways. The name of a particular worksheet can be altered. New sheets can be added. A current sheet can be duplicated or removed. The sheets can be reordered. Other sheets operations can alter the colour of the tabs or change the "protection" status of a worksheet to allow cells to be locked or hidden.
The names of sheets can be changed. This can be done by editing the tab directly. Clicking twice on a tab will highlight the text and then standard editing operations will alter the text contents.
A new empty sheet can be inserted after the current sheet through the Sheet menu entry in the Insert menu or through context menu which appears when the right mouse button is clicked on a tab.
Instead of an empty sheet, a copy of the current worksheet can be added to the workbook after the current sheet by selection the Duplicate this Sheet menu entry from the context menu.
The current sheet can be removed using the Remove this Sheet menu entry from the context menu.
![]() | Warning |
---|---|
Deleting sheets cannot be retrieved through the "Undo" mechanism and is therefore an irreversible operation. Be careful! |
Worksheets can be re-ordered by clicking and holding the left mouse button on a tab, then dragging that tab to the left or to the right. Little arrows will appear showing the location where the sheet will be placed. Releasing the mouse button will then move the sheet to this new positon.
Many of these operations can be performed at once from the Manage Sheets dialog which can be opened through the Manage Sheets... menu entry in either the Sheet submenu in the Edit menu or in the sheet tab's context menu.
Previous Moving Cell Contents, Inserting New Cells or Deleting Cells | Contents | Next Graphing |
Previous | Next |
A major function of moderns spreadsheets is to provide a quick and easy way to plot numerical data in graphical charts of various kinds. The use of graphs provides users a way to explore data to discover relationships and trends in the data values. Graphs also provide an effective way to present data so as to demonstrate relationships in the data and summarize large amounts of data in an effective image. In Gnumeric, both of these can be done easily and efficiently.
When graphs are used to explore data, the aim is usually to produce a plot quickly with a minimum of effort. These plots are not designed to look polished but must present the required information as quickly as possible. To produce these graphs, users must learn a simple series of operations which will produce the desired plots. For speed, the most critical operation involves selecting the cells on the spreadsheet which will be used as data before starting the graphing process.
Graphs which are used to present data must be carefully crafted to communicate effectively. Clarity of communication is the critical factor and the plot may include a large amount of work to ensure that the visual result of the plot helps to communicate the desired result.
![]() | Tip |
---|---|
The use of a graph may not be the best way to communicate information. A verbal explanation or a simple table are often sufficient and, because they are more compact, may be more effective ways to communicate. |
![]() | Tip |
---|---|
Graphs which use a large number of the graphical features available in Gnumeric often appear cluttered. The visual richness of such images can often obscure the message which should be communicated. Spare, elegant and direct graphs will communicate the idea most effectively. |
This section will introduce the process of creating a graph by presenting an example of a side-by-side column chart.
Because a graph requires data, it is first necessary to create some simple data to use in these examples. First we have to input these data into a worksheet. For clarity in this discussion, the word "Interval" should be in cell A1. This will result in a worksheet whose top left corner looks like Figure 3.2, “Gnumeric with the data used in this example.”.
A column plot presents a series of data points as columns whose height depends on the value of each datum. This is a useful type of plot to show the number of eggs produced in each interval.
Making a Column Plot
The quickest way to make a plot starts with the selection of the data. Using the mouse, first select the range B1:C5 which includes the data both for the number of Eggs and for the number of Females.
Next, click on the graphing toolbar button
[D]
Next, click on the word "Column" next to the icon with
vertical colored bars
[D]
Click on the "Ok" button. This will make the druid disappear and leave the mouse cursor as a thin crosshair.
Finally, we will place and size the graph on a sheet. Click on the sheet and drag downward and to the right. As the mouse is dragged, a rectangle will expand. When the mouse button is released, a simple column chart should appear.
The simple graph should look like Figure 3.3, “The Simple Column Graph.”.
The graph can be customized with titles, label boxes and lots of extra information. To customize the graph, right click on the plot to open the graph custom menu. The graph context menu will appear as shown in Figure 3.4, “The context menu which appears on a graph object.”.
This menu provides access to several functions. Users can customize the appearance of graphs by selecting the Properties menu item, can save the graph into PNG or SVG formats using the Save as image menu item, can reorder the various graphical elements displayed in the worksheet using the Top, Up, Down, and Bottom menu items or can delete graphical elements with the Delete menu item.
If we wanted to add a title and a legend to the graph, we could use the Properties menu item to open the graph editor and customize the graph as follows:
Adding a title and legend to the Column Plot
Right click on the column plot to open the context menu and select the Properties menu item. This will open the graph editor.
The graph editor opens with the "Graph" entry selected in
the graph tree on the top left. In the top right is a
preview of the eventual graph. The bottom lists some
attributes of the item selected in the graph tree. Click
and hold on the Add button
[D]
In the text field, add a title such as "Egg Production and Female Productivity" and type the Enter key. Note that the title appears at the top of the graph.
In the graph tree, select the node labelled "Chart1". Next, click and hold on the add button, drag down to the Legend menu item and release. Note that this adds a legend on the right of the graph.
Click on the "Ok" button. The plot should now have a title and a legend. Note that gnumeric has used the words in the column headers automatically to describe the two data series.
The modified graph should look like Figure 3.5, “The Modified Column Graph.”.
Graphical charts in Gnumeric version 1.2 are evolving quickly to provide many types of charts, each of which provides an elegant plot automatically but can be cutomized in detail according the user's preferences. This is a active area for the programmers and therefore will be changing dramatically in the future. Detailled information about graphical charts is presented in Chapter 7, Graphics: Plots, Images and Drawings. That chapter will be updated regularly during development to explain in detail how to produce and modify charts.
Previous Sheets | Contents | Next Printing |
Previous | Next |
Printing in Gnumeric is quite simple and similar to other GNOME applications. Printing can be done using the toolbar buttons or can be accessed through the File menu. Printing usually involves configuring the page properties (like the paper type and margins), then previewing the document to be printed and finally actually printing the document.
In order to configure a worksheet for printing several parameters must be set such as the correct size of the paper sheet, the layout of the spreadsheet, headers and footers and such information. These parameters can be set once for all of the worksheets in a file or separately for each worksheet. The Page Setup... menu entry invokes a dialog through which to alter the printing parameters.
The Print Preview... menu item or toolbar button will open a window which shows what will be printed with the current configuration. By default, printing only applies to the current worksheet but this can be changed in the print dialog explained next.
The Print... menu item or toolbar button will open a dialog which allows the user to select whether to print to a printer or to a postscript or PDF file. Various printers can be selected and the parameters of the job, such as whether to print all the worksheets or only the currently selected worksheet, can be altered. Clicking on the Print button will perform the printing task.
Previous Graphing | Contents | Next File Opening and Saving |
Previous | Next |
When you first start Gnumeric a new workbook will be opened. To save this workbook into a file, click on File->Save As … . This brings up the file dialog where you can pick the filename and format for the book you are saving. It is best to save the book in the Gnumeric XML file format the first time. This allows you to easily edit the file without worrying about changes in the format and look of the book.
Once the file has a name and a file format, saving subsequent
changes can be done easily either through the
File menu, through the toolbar or through a
keyboard shortcut. Saving with the menu requires selecting the
File and then the Save
menu item. Saving with the toolbar simply requires
clicking on
in the tool bar. Finally saving with a keyboard shortcut simply
requires typing
Ctrl+S.
Sometimes you want your book to be saved often so you do not lose any work. To save the book at intervals click on Tools->Auto Save …. The Auto Save dialog appears.
Click on the Automatic Save Every button and enter the number of minutes will pass between each save. When the interval is shorter more of your work will be potentially saved, but Gnumeric might appear sluggish. If Gnumeric is sluggish increase the time between saves. The button Prompt Before Saving brings up a dialog to ask if you want to save the book.
![]() | Warning |
---|---|
Using the automatic saving feature of Gnumeric can save time but is dangerous. Gnumeric does not create a new file each time a file is saved but instead Gnumeric modifies the existing file which destroys the previous work. In certain situations, this feature can lead to the loss of possibly important work. Users are highly recommended to backup their work by copying the original file to a new name or by saving files to newly named files. |
An existing spreadsheet file can be opened in several ways. If the
file has an icon on the desktop, this icon can be clicked or
double-clicked with the mouse button. Similarly, if a file
manager, such as the Nautilus file
manager, lists the file, then the file name can be clicked and
opened. If Gnumeric is already opened,
a file can be opened by clicking on the File
and selecting the Open menu
item. Alternatively, the "Open file" button on the toolbar,
,
can be used or the F3 key clicked. All three of
these open the Open File dialog. You can
then select the spreadsheet file you wish to open.
Gnumeric can open many different types
of spreadsheet file formats.
![]() | Note |
---|---|
If the file has recently been opened in Gnumeric, the file name will appear in the File menu and can simply be clicked to re-open the file. |
Previous Printing | Contents | Next Closing Gnumeric |
Previous | Next |
There are several ways to close Gnumeric. The simplest is to select the File menu and then the Quit menu option at the bottom of the File.
Gnumeric can also be closed through the window manager by clicking on a close box in the window frame or through a pop-up menu. The placement of the box and the invocation of the menu depend on the particular window manager and the theme being used. If the GNOME panel is running the window list applet, clicking with the right mouse button opens a context menu with a Close which can be used to close Gnumeric.
![]() | Note |
---|---|
If any changes have been made to the workbook since the last time it was saved, a dialog will open to ask what is supposed to happen to the contents of the workbook. At this point the contents of the workbook can be saved (Save), the request to close gnumeric can be canceled (Don't Quit) or the most recent changes can be discarded (Discard). If the user decides to save the content, a second dialog may open requesting a file name, location and type for the saved workbook. |
![]() | Note |
---|---|
Any files which are saved by Gnumeric must be deleted by the user. Either the GNOME file manager Nautilus or the shell tool rm can be used to delete the files. |
Previous File Opening and Saving | Contents | Next The Elements of Gnumeric |
Previous | Next |
This chapter describes all of the pieces of Gnumeric which a user can manipulate. The chapter provides explanations for each of the menus, menu entries, toolbar buttons and other elements of the graphical user interface.
![]() | Note |
---|---|
This chapter has not yet been updated for the 1.2 release of Gnumeric but still describes the earlier releases. The descriptions will still be generally useful to those attempting to understand the menu entries of Gnumeric 1.2. This chapter will be updated as time permits. |
Table of Contents
Previous Closing Gnumeric | Contents | Next Overview of the Elements of Gnumeric |
Previous | Next |
This part of the Gnumeric manual explains the pieces of the software that users can manipulate. The menus, the toolbars and the cell grid area comprise what is called the graphical user interface of an application because it is an interface --- a way to interact with Gnumeric --- which is made of graphical elements --- pictures --- designed to be used by human users.
Gnumeric opens by default with a view of an empty workbook which is called "Book 1" and which contains three worksheets: "Sheet1", "Sheet2", and "Sheet3" as can be seen in Figure 4.1, “The Gnumeric worksheet elements”. The outermost portion of the window is not actually part of Gnumeric and may look different on different machines. Gnumeric attempts to place its name and the name of the workbook on this outer portion.
The majority of spreadsheet work is done while interacting with this view of Gnumeric. All of the functions which Gnumeric provides can be accessed quickly from here. The graphic elements of Gnumeric are made of several independent pieces. Figure 4.1, “The Gnumeric worksheet elements” shows a newly opened, empty Gnumeric with the principle elements labelled.
The elements names are listed below along with a reference to the section that discusses that element. Those reading this document on their computers may be able to click on the references to jump to that section of the manual.
The menubar provides access to the core functions of gnome. Almost everything that can be done in Gnumeric can be done through the menus. The menus and menubar are discussed in the section called “Introduction to Menus”.
The standard toolbar provides shortcuts for the most used items in the menus. The toolbars are discussed in the section called “The Gnumeric Toolbars” and this toolbar in particular in the section called “The Standard Toolbar”.
The format toolbar changes the display properties of data in the workbook. It is presented in the section called “The Format Toolbar”, part of the general discussion of toolbars of the section called “The Gnumeric Toolbars”.
The data entry area is useful for the modification of complex formulas. It is discussed in the section called “Data Entry Area”.
This area is used by Gnumeric to give feedback on the status of certain operations. This information is explained in the section called “The Information Area”.
This toolbar enables the user to draw graphic elements on the sheet, such as text labels, big red circles or thin green arrows. These can be used to bring attention to a particular part of a worksheet. The object toolbar is explained in the section called “The Object Toolbar” in the the section called “The Gnumeric Toolbars” portion of the manual.
The cell area lies in the middle of all the rest. The cell area includes the row and column labels, the scrollbars and the tabs below. The use of these elements is explained in the section called “The Cell Grid”.
The next chapters will explain each of these elements. the section called “Introduction to Menus” will explain the menus, the section called “The Gnumeric Toolbars” will explain the toolbars and the section called “The Elements of the Gnumeric Worksheet” will explain the remaining elements.
Previous The Elements of Gnumeric | Contents | Next Introduction to Menus |
Previous | Next |
This section of the manual describes the use of the menubar and the menus themselves. The rest of the section called “Introduction to Menus” then explains each entry in every Gnumeric menu, submenu or context menu.
A menu is a graphical element within a program which appears with a list of options. For instance, almost all applications have a File menu through which the user can access the computer's filesystem to open or save their work. The main menus are on the menubar. The use of these menus is discussed in the section called “The Menubar”.
Gnumeric also uses context menus to give users a quick way to access certain commands. The context menu will open up right under the mouse pointer when one of the mouse buttons, usually the rightmost, is clicked. This menu is called a context menu because the entries in the menu are different depending on the location of the mouse pointer. The context menus are discussed in the section called “Context Menus in Gnumeric”.
Both the main menus, on the menubar, and context menus may have sub-menus. Sub-menus are indicated by a small right pointing arrow. To access the sub-menus, the user must move the pointer down to the sub-menu entry and carefully across to the position of the little arrow. After an instant the sub-menu will open up and the user must carefully move the pointer directly across into the sub-menu. Occasionally, when there is not enough room to the right of the currently open menu, sub-menus may open to the left. Navigating sub-menus can be difficult since the menu will close if the mouse pointer moves into any other menu entry.
Menu entries which are followed by an ellipsis (three dots) indicate that this entry will open a dialog window which will ask the user for more choices.
The default location of the menubar is at the top of the application window. The menus provide quick and organized access to all major commands such as opening files, saving files, printing and quitting the application.
The leftmost portion of the menubar is a little tab. This tab can be used to grab the menu bar and remove it from the rest of the application. This is done by clicking and holding on the tab and dragging it away from the Gnumeric window. The menu can also be placed in different parts of the Gnumeric window, so that it could appear at the very bottom of Gnumeric as is shown in Figure 4.3, “A re-arranged Gnumeric.”.
The menubars and the toolbars share this ability to be re-arranged. The menubar is at the bottom of the Gnumeric window, the standard toolbar has been detached and the object toolbar has been moved the the right side. The user can choose what configuration works best. The toolbars can be dragged back into place in the same manner by which they were moved originally.
Gnumeric menus are opened with a simple click on the name of the menu in the menu bar. Once clicked, the menu will stay open. If the mouse pointer is dragged over the name of another menu on the menubar, the first menu will close and the new menu open up. This is a useful way to look in each menu to hunt for a commands. Menus can also be opened through the keyboard. One of the letters in each menu is underlined. Typing the Alt key at the same time as the underlined letter key will open the menu. This is also true of sub-menus. Once the menus are open, the arrow keys can be used to move between menus or select an entry in a particular menu. An open menu can be closed with a click over any other area of the application or of the desktop. The menus can also be closed by typing the escape key, Esc.
Gnumeric menus, like most menus in GNOME project software, are "tear-off" menus. This means that the menu can be opened up into its own window and kept open in a differnt part of the screen. This is useful if there is a menu that you keep using for a particular task. Just beneath the top of each menu is a dashed line. Clicking on that line tears off the menu.
To get rid of a dettached menu, the dotted line can be clicked once more or the window containing the menu can simply be closed. The window can usually be closed by clicking in the top right corner of the window. Like the window containing Gnumeric, this outer window is not actually made by Gnumeric. Therefore the manner in which a user closes this window will depend on the configuration of the desktop the user has chosen.
Many menu entries are followed by a series of keynames. These keys can be used to perform the menu action without having to open the menu. These are often combinations of keys involving the control key which is labeled as Ctrl, the shift key which is labeled Shift and the function keys which are labeled with an F and then a number. For example, to quickly cut a selection (accessible through the Edit menu), the user can make a selection and then type the control key and the "x" key at the same time.
Previous Overview of the Elements of Gnumeric | Contents | Next The File Menu |
Previous | Next |
The File menu is the most important menu in Gnumeric because it gives the user the ability to interact with the computer operating system. This menu allows the user to create files containing all the work they have done. It also enables users to print the results of their work. Finally, the File menu is the best way to close Gnumeric.
The menu choices are grouped into the following groups:
New --- Create a new workbook. This opens a new workbook in a new window. By default the workbook will be named "Book1" or another number if there is already a worksheet with that name open. Note that the opened file has not yet been saved.
Open... --- The Open menu item opens the file chooser dialog to allow the user to pick an existing workbook for Gnumeric to open. Only two file types can be opened with this option. The Open menu item can open Gnumeric's default XML based file format which uses the extension ".gnumeric" and can open Microsoft Excel's file format which uses the ".xls" extension. The Open menu item creates a new window containing the selected file. A more extensive dicsussion is presented in the section called “Opening Files”.
Import... --- The Import... menu item opens a file chooser dialog similar to the one opened by the Open menu item. The Import... dialog has a file type selector in which the user can pick supported file formats. For more information on file import, including the extensive druid to assist users importing text files, such as tab delimited files or comma separated value files, see the section called “Importing Files”.
Save --- The Save menu item saves the current worksheet. If the file has been named and saved before, this will silently save the file to the current filename. If it has not been saved before, this will act as if the Save As... menu item had been called and prompt the user for a filename.
Save As... --- The Save As... menu item allows users to save a file which has not yet been named to a named file. This is always used when a user saves a file which Gnumeric has named by default. This menu item can also be used to save a newly created file or to save an existing file to a new and different name. For an explanation of the file formats which gnumeric supports see the section called “Saving Files”.
These menu items enable Gnumeric to print. Each item is presented below and printing issues are discussed fully in Chapter 12, Printing.
Page Setup... --- The Page Setup... menu item call the Page Setup dialog. This dialog allows the user to set various printing options such as paper type, margin sizes and running header and footer formats. This dialog is explained in detail in the section called “Page Setup.”.
Print... --- The Print... menu item allows a user to print one or all of the worksheets in a workbook. Gnumeric can send files directly to a printer or can print to postscript or portable document format files. The Print dialog is explained further in the section called “Printing to a Printer or a File.”.
Print Preview... --- The Print Preview... menu item calls a dialog which presents the current workbook as it would be printed with the current Page Setup settings. The dialog also permits the user to print. This dialog is explained in the section called “Print Preview.”.
This menu item opens a dialog with fields to edit the document summary information of the file currently open in that window. Summary information describes the sheet, for instance, with the author name and a comment.
These menu entries are shortcuts to re-open recently used files. The list will change dynamically as new workbooks are opened and created. Clicking on a file name listed here is the same as using the Open menu entry and finding the file in the Find File dialog. Note that if the file has been moved since Gnumeric last saved it, Gnumeric will not find the file.
These menu items either close the current worksheet, Close, or close all open worksheets, Quit. Gnumeric will prompt the user with a Save Workbook.. dialog for any workbooks that have been changed since the last time they were opened or saved.
Close --- The Close menu item allows the user to close the current workbook. If this is the only workbook which this instance of Gnumeric has open, the close operation will also quit Gnumeric. If other workbooks are open, this workbook will close without affecting the others. If the workbook has unsaved changes, Gnumeric will ask the user if he wants to save the file.
Exit --- The Exit menu item will close all the workbooks currently being used by Gnumeric and quit the program. Gnumeric will prompt the user asking if he wants to save any workbooks which has changes which have not been saved.
Previous Introduction to Menus | Contents | Next The Edit Menu |
Previous | Next |
The Edit menu is mostly used for operations on a worksheet or between worksheets. This menu gives users powerful editing operations such as the ability to undo recent changes, the ability to cut and paste selections of cells and the ability to search for specific cell contents.
The menu choices are grouped into the following groups:
These menu items allow the user to remove recent changes to a worksheet or re-introduce changes which have been undone. These options give the user control over recent edits. This functionality is often called the "change history" of an application.
The type of edit has no importance. An edit which deletes the contents of a cell is treated in the same way as an edit which adds contents to a cell. The change history is session specific. The user will not be able to undo changes through the change history if the file is saved and then re-opened. Note also that the list only covers the last few dozen operations. The number of operations which Gnumeric tracks in its history depends on the size and complexity of those operations. Finally, there are some operations which cannot yet be modified in this way in Gnumeric 1.0. Sheet operations (adding or removal) cannot be undone, nor can deleted comments be restored, nor can altered summary information, nor can operations on embedded objects be undone.
Undo --- The Undo menu item is used to remove the last few edits from a workbook. The edits must be undone in order. This menu item removes only the last edit from the workbook. The user can also access the undo list through one of the toolbar buttons and its associated menu. With this menu, the user can undo several operations at once. This is explained in section the section called “The Standard Toolbar”.
Redo --- The Redo menu item is used after an undo operation to restore the change that was undone. The menu item only restores the last undone operation. Users can also resotre edit using a button on the standard toolbar and through the associated menu. The menu allows several operations to be redone at once. It is explained in the section called “The Standard Toolbar”.
These menu items enable selected cell contents to be moved around a spreadsheet, moved between worksheets or between workbooks. Selections are areas of the spreadsheet that have been chosen, usually with the mouse, and are usually colored pale blue. Selections are explained in greater detail in the section called “Selecting Cells and Cell Ranges”. Gnumeric currently only allows single range selections for these operations.
To use these menuitems, the user must first select the range of the cut or copy area. When the user then picks these menuitems, the contents of the selected areas will be entered into the Gnumeric clipboard and into the X clipboard. The contents of the Gnumeric clipboard can then be inserted into a new region of the spreadsheet, into another worksheet or into a new workbook. The X clipboard holds the space delimited results of each cell: either the text or the result of any calculation. The X clipboard can be pasted into any text area.
Cut --- The Cut menu item is used to remove a selection from the selected area of a currently open workbook. When the menu item is chosen, the selected area will be outlined with a moving dotted line. This is the area which will be moved. The selection will only be removed after it is moved to the new location. Until then cut has not had an effect on the worksheet.
Copy --- The Copy menu item allows a user to duplicate a selection. The original data remains where it was and the Gnumeric clipboard (and the X clipboard) has a copy which can be inserted elsewhere.
Paste --- The Paste menu item is used to paste the contents of a selection which has been cut or copied. If the selection was cut, it is pasted into the new location unchanged. Cell references will not change in that they will still point to the same cells.
Paste Special... --- The Paste Special... is used to paste a selection while altering certain characteristics. The Paste Special... menu item opens a dialog with three categories. The defaults make Paste Special... act as if it were the Paste menu item.
The first set of choices allow the user to control the data pasted.The user can chose to limit the pasting to only the cell contents (no cell formatting is copied) or the opposite only cell formats copied (no contents). Furthermore, the user can insert the selection while transforming all the contents into values only. Formulas will not be copied, only the results will be.
A second set of choices allows the user to perform simple mathematical transformations during the paste. The data in the cells being pasted into are modified by the cell contents. For instance, using the divide operation will result in each cell in the zone pasted into being divided by the equivalent cell which was cut or copied originally.
The final choices allow the transposition of the original selection or to not paste empty cells. The transpose check box will change the selection so that the cells that are down n rows from the selection's origin are pasted as being over n columns (and vice-versa). The skip blanks prevents Gnumeric from taking any action for the cells in the selection that are blank. Note that the selection will be transformed if that option is selected but then that the paste will not change the cells in the transformed location if this skip blanks option is selected.
All of these operations remove data from the worksheet. They differ in the type of data removed and the re-arangement of remaining data. The differences are explained below.
Clear --- The clear menu item merely opens a sub-menu with four choices. The user can choose to clear all the elements of the cells in a selection: the formats, the comments, the contents. Alternatively, the user can choose to clear a single one of those elemets. Clearing the formats will leave the data or formula in the cell intact. It will remove any borders, re-set the cell alignments, change the background colour to white and the text colour to black and reset the number format to General. Clearing the comments will simply delete the comments for the cells in that location. Finally clearing the contents will leave the cell's formatting in place but remove the formula or data contents of the cell.
Delete --- The delete menu item may open a dialog giving the user a choice of options. Any of the options will completely delete the selected cells. Depending on the selection, Gnumeric will fill in the space the cells were occupying differently. With column or row selections, the effect is easy to understand and no choice is possible so Gnumeric does not open the dialog. The space left by selected rows, is filled by moving lower rows up whereas the space filled by deleting columns is filled by moving to the left columns which were right of the selection. For example, if columns D and E are selected for deletion, Gnumeric will move the contents of all columns from F onwards two columns to the left.
With blocks of cells, the delete menu item will open a dialog asking the user how to fill in the deleted cells. Blocks of cells will either be filled in by the columns of cells below the block selection or by the rows on the right of the block. For example, if the user chose the block of cells from E6:G8 for deletion, those cells could be filled in by the cells below E8, F8 and G8 if the Shift cells up option were chosen. Alternatively, the cells to the right of G6, G7 and G8 could fill in the space from the right if the Shift cells left option were chosen.
These menu entries do not group together logically. Each entry is explained in detail below.
Sheet --- The Sheet menu item opens up a submenu which allows users to perform operations on the worksheet. Note that this is the same set of choices as are available from the context menu which appears by clicking (usually with the right mouse button) on one of the worksheet tabs. The worksheet can be duplicated to create a second sheet with the same contents. A new worksheet can be inserted immediately following the current sheet. The current sheet can be renamed in a the little pop-up window. The sheets can be re-ordered or the current sheet can be deleted. For this last option Gnumeric asks for confirmation since this choice cannot be undone.
Select --- The Select menu item allows the user to select various portions of the worksheet. The Select All provides a quick way to select the entire worksheet. The Select Row and Select Column menuitems allow the user to select all the rows or columns spanned by the current selection.
The Select Array menu item allows a user to select all the cells which are part of the same array as the current cell. The Select Depends menu item selects all the cells which are formulas which at least partially need the data in the current cell.
Fill --- The Fill menu item opens a submenu with only one choice currently. The Autoill menu item will fill an entire selection with any formula which is in the top left cell of the selection.
Search... --- The Search... menu item opens a dialog to search for cells with particular content. The dialog has three tabs. In the first the user can enter the information the user wants to find and some constraints on the search. The second tab gives some extra choices for the search. When the user has picked the options they perfer, pushing the search button on the first tab will run the search. The third tab will show which cells match the search.
Search and Replace... --- The Search and Replace... menu item will launch a dialog to find cells with particular characteristics and replace them all with a common content. This dialog is similar to the Search dialog.
Goto cell... --- The Goto cell... menuitemn opens up a dialog which allows the user to type the name of a cell in the worksheet. The current view will then change to be sure that the selected cell is in the current view and the selection will cover that cell.
Recalculate --- The Recalculate menu item forces the workbook to recalculate its results. This is useful if a formula in the current worksheet depends on a cell in a different workbook. Gnumeric will not necessarily know when that data has been updated so a user can force Gnumeric to recalculate all the cells in the current workbook.
Previous The File Menu | Contents | Next The View Menu |
Previous | Next |
The View menu is
The menu choices are grouped into the following groups:
These menu items allow the user to open multiple views of the same document.
New Shared --- The New Shared menu item opens up a new window with the current workbook visible and where both windows are open to the same section of the workbook. If the user starts editing a different part of the sheet in one view, the other view moves automatically to that portion of the worksheet. Similarly, if the user changes to a different worksheet in one view, the other view changes also.
New Unshared --- The New Unshared menu item opens up a new window with the current workbook visible. Both view are then independent. When a change is made in either view, the other will move to show the area of the edit.
TheZoom menu item allows a user to change the amount of the sheet visible in a window of a given size. The Freeze Panes menu item allows part of the worksheet to be frozen in place while the rest of the sheet scrolls next to it.
Zoom... --- The Zoom menu item opens a dialog which allows the user to set the magnification of any of the worksheets in the current workbook.
Freeze Panes --- The Freeze Panes menu item is used to freeze the top-most and leftmost visible portion of the worksheet. This is useful to be able to line up portions of the worksheet which are not usually together. For instance, if a user had a very large table with the titles of each oolumn of data on row 12, the user could select row 13 and select this menu item. If the user scrolled through each data row, the data would line up underneath each header.
Gnumeric freezes the portion of the worksheet which is currently visible and is above and left of the current selection. If the selection is not visible, then the frozen section will be nine rows tall and five columns wide unless the selection is in a currently visible column or row in which case that postion is used.
Gnumeric currently does not support freezing only columns or only rows. The user can simply move the selection far to the right or far below of the area they want to freeze. This will achieve the same effect. Currently, inserted objects are not tracked with frozen panes. Objects which are not in the lower right hand pane are lost from view while the panes are frozen. These objects reappear when the view is unfrozen.
The Toolbars menu option launches a dialog to configure the presence and look of the three toolbars. This dialog allows the user either to show or completely hide each toolbar. The user can also set the toolbars to display as icons or as icons and text. The third selection Priority text only currently has no effect. This dialog allows users to view tooltips as the mouse scrolls over the toolbars. Tooltips are small windows which open up automatically when the mouse pointer is over a button. These windows contain a text explanation of the button under the mouse pointer.
Previous The Edit Menu | Contents | Next The Insert Menu |
Previous | Next |
The Insert menu is
The menu choices are grouped into the following groups:
These menu items allow the user to insert objects to the workbook.
Sheet --- The Sheet menu item allows the user to inset a worksheet immediately following the current sheet.
Rows --- The Rows menu item will insert rows above the current selection. The number of rows inserted will be equal to the number of rows spanned by the current selection.
Columns --- The Columns menu item will insert columns to the left of the current selection. The number of columns inserted will equal the number of columns spanned by the current selection.
Cells... --- The Cells... menu item opens a dialog asking the user how the sheet should be altered when new cells are inserted. The dialog lists four choices. The user can choose one of these by clicking the mouse pointer on one of the four dots. Only one choice is possible and the currently selected choice has a black dot in front.
The Shift cells right will insert a region of new cells of the size of the current selection. Cells which are on the same row as the selection and within or to the right of the selection will shift over to the right to accomodate the new cells. The Shift cells down choice will also insert a region of new cells the same size as the current selection. With this choice, cells which are in the selection or below the selection will move down to accomodate the new cells. The two other choices will act as if the user had chosen to insert rows or columns. These actions are explained above.
Graph... --- The Graph... menu item will allow a user to insert a graphic plot of data. This menu item will launch the graph druid. Graphing in Gnumeric is explained in the section called “Adding Data Plots to a Worksheet”.
Object... --- The Object... menu item launches a dialog with the objects which Gnumeric is currently able to embed in a worksheet. The user simply picks one of the objects in the list, and then inserts the object into the worksheet. These objects are not part of Gnumeric but are provided by other programs in the GNOME project.
Shaped Object... --- The Shaped Object... menu item allows user to insert more complicated objects into a worksheet. This is currently not used but will provide more extended functionality for the future.
The menu items insert objects into the current cell.
Name --- The Name menu item opens a sub-menu with the single entry Define. This will open a dialog to allow the user to define a named expression. The expression can be as simple as defining an expression called "Total" which refers to a particular cell. However, the user can also build up a whole sheet with named experssions. the section called “Names” explains names in greater detail.
Add/Modify comment... --- This menu item opens a dialog to allow the user to enter a comment to the currently selected cell. A red triangle will appear in the top right corner of the cell to show that the cell has a comment.
Special --- The Special menu item opens a sub-menu which allows the user to insert either the current date or the current time into the selected cell.
Previous The View Menu | Contents | Next The Format Menu |
Previous | Next |
The Format menu allows users to control the formats of cells, columns, rows, worksheets and the workbook. This menu also gives users access to templates of standard formats.
Cells... --- The Cells... menu item opens the cell format dialog. This dialog is used to set cell data types and formats. It is explained in the section called “Formating Cells”.
Column --- The Column menu item opens a sub-menu with choices to allows the user to modify the view of the selected columns.
Width... --- The Width... menu item opens a dialog to enable the user to adjust the size of the columns which hold the current selection. The dialog has a single entry box in which the user can change the current size of the column in points.
Auto Fit Selection --- This menu item makes Gnumeric automatically choose the optimal column size to display all of the text in the current selection.
Hide --- The Hide menu item will hide the columns containing the current selection. Gnumeric still holds these columns in memory and will save them to a file but will not display those columns. The only indication that a user has that columns have been hidden is that the column header names are not sequential.
Unhide --- This menu item wiil show columns which are hidden if the selection spans the two columns on either side of the selection. If columns D, E, and F have been hidden, the selection must span at least across columns C and G for this menu item to unhide columns D, E, and F.
Standard Width --- This menu item allows the user to resize the columns which hold the selection to the standard size. At 100 percent zoom this is 48 points or 64 pixels.
Row --- The Row menu item provides the same functions as the Column menu item but operates on rows.
Height... --- This menu item opens a dialog which allows the user to type in a row height in pixels.
Auto Fit Selection --- This menu item changes the rows which hold the selection to the optimal height to hold the text in the selection.
Hide --- The Hide menu item will hide the rows in the selection. The workbook still contains the data in the hidden rows but those rows are not shown.
Unhide --- This menu item will make hidden rows visible. The selection must span the rows which are hidden for this menu item to unhide the hidden rows.
Standard Height --- This menu item resizes the rows back to the default height of 12.75 points or 17 pixels (at 100 percent zoom).
Sheet --- The Sheet menu item opens a sub-menu with operations to change properties of the worksheet.
Change Name... --- This opens a dialog with the name of the worksheet. A user can use this to change the name of the current sheet.
Re-Order Sheets... ---- This opens a dialog with the names of all the sheets. A user can click on one of the names in the dialog and then click on the up and down arrows, as appropriate, to move the selected sheet in front or behind others. The tabs for the sheets will move at the same time. This dialog also allows the user to delete sheets.
Display Formulas --- This menu item acts as a toogle. By default it is unset and formulas results are displayed. If this menu item is clicked, it will display a little check mark on the left. The worksheet will show the actual fomuals for all cells with formulas instead of showing the calculated result. This is useful for quickly assessing which cells contain formulas and which contain data.
Hide Zeros --- This menu item acts as a toggle. Click on this menu item will cause a check mark to appear on the left. The sheet will then display all the cells which display zeros as empty cells. This is useful in sheets with many zero results, to quickly find cells with data.
Hide Gridlines --- This menu item acts as a toggle. If this menu item is clicked, Gnumeric will display a check mark to the left of the menu item. The lines which separate all the cells will then be hidden and Gnumeric will appear to be a blank background. This is useful to make certain data look pretty on screen.
Hide Column Headers --- This menu item acts as a toggle. If this menu item is clicked, Gnumeric display a check mark on the left of the menu item. Gnumeric will also hide the boxes with the alphabetical names of the columns.
Hide Row Header --- This menu item acts as a toggle. If this menu item is clicked, Gnumeric display a check mark on the left of the menu item. Gnumeric will also hide the boxes with the numeric names of the rows.
Autoformat... This menu item opens the autoformat dialog to give user access to a list of format templates. Format templates are useful for users who are often filling out tables in a particular format. The user picks an area of the worksheet into which they want to apply the template. Most templates define headers and footers so the selection area must be big enough to fit those template elements and the user's data. The template will not affect data which has already been input into a worksheet.
The dialog has two tabs: Preview and Template Details. The details are simply information about the template. The Preview tab has three main options: a Settings menu, an Edit menu and a category chooser. The settings menu allows a user to pick what parts of the template they want to copy into the worksheet. The edit menu will be used to create new templates. Currently templates are written as text into an extensible markup language (XML) format. The catory chooser gives the user access to different groups of templates. Templates in each category are displayed in the middle area of the dialog. Users select the template they want to use by clicking on it. The currently selected template is highlighted with a red boundary which may be hard to see.
Workbook... This menu item opens a dialog which allows users to configure the current workbook. The dialog currently has four choices. Text autocomplete can be unset which means that Gnumeric will not compare text as it entered against text in above it in the column. Text autocomplete is useful to users entering data because if entries are repeated, Gnumeric can guess what the user intends. The user can simply type the Tab key and Gnumeric will enter the rest of the text. The use of notebook tabs can be turned off, as can the horizontal and vertical scrollbars.
Previous The Insert Menu | Contents | Next The Tools Menu |
Previous | Next |
The Tools menu is
The menu choices are grouped into the following groups:
This entry launches the plug-in manangement dialog. Plug-ins are programs which are separate from Gnumeric but provide useful functionality. Some of the core parts of gnumeric, such as Excel file format support, are actually plugins. This means that a user who never uses Excel files can remove this module from Gnumeric and make Gnumeric use less memory.
These two tools allow the user to make Gnumeric automatically correct typing or automatically save workbooks at periodic intervals.
Auto Correct... --- The Auto Correct... menu item opens a dialog which allows the user to configure the way in which gnumeric automatically corrects text which is being entered. The dialog presents the user with three tabs. Each of these tabs allows the user to correct one type of common spelling mistake, while allowing the user to add exceptions to the rules. Gnumeric can automatically caplitalize the names of week days. Gnumeric can automatically change an entry which starts with two capital letters to only start with one and Gnumeric can change a sentence entry to start with a capital letter.
Auto Save --- The Auto Save menu item opens a dialog which allows the user to have Gnumeric automatically save the current workbook after a fixed interval of time. The user can also have Gnumeric ask for confirmation before saving so that the user always remains aware of the state the workbook was in when it was saved.
Gnumeric can be used to solve systems of linear equations and other mathematical problems. These two dialogs enable access to these tools. A full discussion of these tools is presented in the section called “Solver”.
Goal Seek --- The Goal Seek menu item opens a dialog through which the user can configure Gnumeric to iteratively search for a numeric value which solves a formula. This dialog is explained in the section called “Goal Seek Tool”.
Solver --- The Solver menu item opens a dialog through which the user can configure Gnumeric to solve linear systems of equations. This is explained in the section called “Solver”.
Statistical analysis can easily be done with Gnumeric. All the statistical tools are explained in the section called “Statistical Analysis”.
Previous The Format Menu | Contents | Next The Data Menu |
Previous | Next |
The Data menu is
The menu choices are grouped into the following groups:
These menu items allow the user to re-organize data fields.
Sort... --- The Sort... menu item opens a dialog which allows users to sort a selection according to defined criteria. By default Gnumeric sorts rows depending on the contents of the cells in a particular column of each row. The sort criteria can be extended to calculate on the basis of the cells in several columns. Gnumeric can sort a selection using any number of rules. Rules can be added using the Add button. Rules with no column entered will be ignored or the user can remove these rules with the Remove button.
For each rule, the dialog has an entry box in which the column to be sorted must be entered. The dropdown box (the little down pointing arrow) will show a list of appropriate columns. The user can determine a sort order for the selection. The Advanced button allows the user to further characterize the sort criteria.
If the first row of the selection is a header, Gnumeric can be told not to shuffle this row during the sort. Gnumeric can also sort columns based on the contents of cells in specified rows, instead of shuffling rows on the basis of columns, if the user toggles the Sort to act right-left instead of top-down.
Filter --- The Filter menu item opens a sub-menu which currently only has the Advanced Filter entry. Filters are explained in the section called “Filtering Data”.
Validate... --- The Validate... menu item opens the cell format dialog to the validation tab. Validation is a means of constraining the contents of a cell either to have a certain value or to fall within a certain range.
Consolidate... --- The Consolidate... menu item opens a dialog box through which a user can create derived information based on data in other worksheets.
The sub-menu options of the Group and Outline menu are useful for creating data hiearchies within a worksheet.
Previous The Tools Menu | Contents | Next The Help Menu |
Previous | Next |
The Help menu is quite simple.
The Help menu connects users to this manual, to the list of functions available for use in Gnumeric and to the list of people who created this wonderful application.
This menu contains:
Gnumeric Manual —Clicking on this menu entry should launch the local help system and display this manual.
Gnumeric Function Reference —View the Gnumeric function reference, a list and description of the functions available in Gnumeric.
About —Shows basic information about Gnumeric, such as the authors' names and the application version number.
Previous The Data Menu | Contents | Next Context Menus in Gnumeric |
Previous | Next |
Context menus are menus which open up under the mouse pointer and are therefore detached from the format graphical structure of the applicaton. These menus provide an extra and convenient way to access Gnumeric commands. All of the commands in context menus are available through the regular menu system. Context menus provide different commands depending on the position of the pointer.
To activate a context menu, a user simply positions the pointer over the appropriate area and clicks one of the buttons on their mouse. Since this button is configurable and users have mice with different buttons, it may be a different button on any given machine or may even require the combination of a keyboard key and a mouse buttons. The user will have to find how to do this themselves.
Currently Gnumeric provides five different context menus. The context menu that is called in the central grid area is discussed next in the section called “The Context Menu for the Cell Grid Area”. The Context menu that appears when the pointer is over the row headers or column headers is presented in the section called “The Context Menu for Column and Row Headers”. Another context menu relates to the worksheet tabs and is explained in the section called “The Context Menu menu for Worksheet Tabs”. Yet another context menu applies to embbeded objects or shaped components such as a plot. These are shown in the section called “The Context Menu for Embedded Objects and Components”. The final context menu allows the configuration of the toolbars. This menu is presented in the section called “The Context Menu for Toolbars”.
The context menu in the cell grid area apprears when the pointer is over the cell grid area. This menu applies to the cells that have been selected, not necessarily the cell underneath the mouse pointer.
The grid context menu merely provides an extra way to access Gnumeric commands. The Cut, Copy, Paste, Paste Special..., Delete..., and Clear Contents... commands are taken from the Edit menu and are explained in the section called “The Edit Menu”. The Insert... menu item is explained in the section on the Insert menu in the section called “The Insert Menu”. The Format Cells... is explained in the manual section on the Format menu in the section called “The Format Menu”.
The Context Menu for Column and Row Headers
The context menu which relates to column or row headers is similar to the context menu for the grid area. Both insert and delte operations are modified to operate explicitly on rows or on columns. An option is added which changes the height of rows or the width of columns. This context menu also provides a way to hide rows or columns and a way to reveal missing columns or rows.
The Context Menu menu for Worksheet Tabs.
The context menu for tabs provides the same functions as are provided in the Sheet menu item in the Edit menu. These options are explained at the bottom of the section called “The Edit Menu”.
The Context Menu for Embedded Objects and Components.
Since this menu gives access to functionality which is not part of Gnumeric, the menu entries will be different for each kind of object. This menu is accessible when first selecting on the embedded object or if the user clicks on the very border of the inserted object. All objects will provide a method to delete the object which will remove the object. Note that this operation will mostly not register into Gnumeric's history and therefore cannot easily be reversed.
The Context Menu for Toolbars
The context menu for toolbars allows the user to configure toolbars. Each toolbar entry can have text associated with it or simply be an icon. The text only does not currently work in Gnumeric. The tooltips which are displayed by default can be turned off for this toolbar. The toolbar itself can be removed to save space. Finally the customize dialog can be launched which allows the user to configure these options for all the toolbars at once.
Previous The Help Menu | Contents | Next The Gnumeric Toolbars |
Previous | Next |
The toolbars contain buttons and other elements which can be used to perform quickly some the more common operations. Each button has an icon intended to provide a mneumonic reminder of the operation performed by the button. The toolbar elements are intended to provide fast access to the commonly used tools. Almost all of these functions are also available through the menu system. The specific actions required to use each button vary.
Gnumeric has three toolbars, the standard toolbar, the format toolbar and the object toolbar. The three toolbars are shown in Figure 4.18, “The Three Gnumeric Toolbars”.
These toolbars will be discussed separately in the subsequent sections of this manual. User interaction with each toolbar happens in essentially the same way. Similarly, the toobars can be configured in the same way. The next section explains the standard behavior of Gnumeric toolbars.
In the same way that menus can be moved around, as was explained the section called “The Menubar”, toolbars can be moved around the Gnumeric window by dragging the little tag on the leftmost portion of the toolbar.
If the Gnumeric window is too small to fit all of the toolbar buttons, gnumeric may display a little right pointing black arrow to indicate that there are more options. If the user clicks on this arrow, a window will open with the remaining buttons.
Certain toolbar options, such as the zoom box, are combinations of a button or text entry area and a downward pointing arrow. If the user clicks on the arrow, a list of avaliable options appears. It is also posible to "tear off" these options into a separate window in the same way as was explained for menus in the section called “General Menu Behavior”.
The toolbars can be configured by a context-menu which opens when the user clicks with a particular mouse button on an empty part of the toolbars or on the toolbar handle. This menu is explained in the section called “The Context Menu for Toolbars”.
Previous Context Menus in Gnumeric | Contents | Next The Standard Toolbar |
Previous | Next |
The standard toolbar is shown in Figure 4.19, “The Standard Toolbar.”.
The Standard Toolbar gives the user access to file operations, printing, movement of data blocks, the undo system, and to some of the powerful tools like the function creator and the graphing system.
Create a new file.
Open an existing file.
Save the current worksheet to disk.
Print the current worksheet or workbook to a file or a printer.
Display a print preview of the current worksheet.
Copy the cells in the current selection to the clipboard buffer and mark them to be deleted from the current position. The cells will only be removed if they are pasted into a new position.
Copy the cells in the current selection to the clipboard buffer.
Paste the contents of the clipboard buffer into the active cell.
Undoes the last operation undertaken.
This is the reverse of the undo operation, restoring its orginal state.
Starts a simple sum formula in the selected cell with Gnumeric simply waiting for a selection to be made to complete the sum. The user selects the destination cell, pushes this button, enters the range to be summed and pushes the confirm button (green arrow) in the data entry area or types the Return key.
This button will start a formula in the current cell using the function druid.
Sorts the selected region in ascending order based on the first column selected.
Sorts the selected region in descending order based on the first column selected.
This button calls the graph druid to create a graph.
This button will insert a component object into the current worksheet. Components are the way that the GNOME project has chosen to enable certain programs to use others within themselves. Gnumeric is able to use the Guppi plotting program and the Dia diagramming program in this way.
This button allows user to insert a component into Gnumeric that is not a simple rectangle but may have an arbitrary shape. This functionality is currently not used but provided for future needs.
The zoom button allows the users to tradeoff the extent of the worksheet which is visible against the size of the visible text and cells.
Previous The Gnumeric Toolbars | Contents | Next The Format Toolbar |
Previous | Next |
The Format Toolbar ...
The Format Toolbar.
The user can change the font of a selection either by typing the name of a new font in the text area of this box or by clicking on the little arrow to the right of the text area. This will cause a menu to appear from which a font can be chosen.
The user can change the font size of a selection by typing the number of a different font size or by clicking on the little arrow to the right of the entry box and selecting the perferred size.
Change the style of the current cell to be bold, or un bold it if it is already bold.
Change the style of the current cell to be italicized.
Change the style of the current cell to be underlined.
Justify the contents of the cell to the left of the cell.
Center the content of the cells.
Justify the content of the cells to the right side of the cells
Center the content of the cells on the selected cells.
Merge the selected cells into a single cell.
Split previously merged cells into separate cells.
Sets the format of the selected cells to be monetary.
Sets the format of the selected cells to be a percentage.
Sets the format of the selected cells to use thousands separator.
Increases the number of decimals shown in the currently selected cell.
Decreases the number of decimals in the currently selected cell.
This button decreases the indentation of selected elements.
This button increases the indentation of selected elements.
This button and drop down menu can be used to set the borders of all the cells in the selection.
This button and drop down menu can be used to set the back ground colour.
This can be used to change the colour of the text.
Previous The Standard Toolbar | Contents | Next The Object Toolbar |
Previous | Next |
The Object Toolbar.
This button allows the user to insert a text label into a worksheet.
This button allows a user to insert a frame into a worksheet.
This button allows a user to insert a check box.
This button allows a user to insert a list.
This allows a user to insert a Combo Box.
Draw a line on the worksheet.
Draw a line with a arrow at one end. A pointer.
Draw a box onto the worksheet.
Draw an ellipse or a circle on the worksheet.
Previous The Format Toolbar | Contents | Next The Elements of the Gnumeric Worksheet |
Previous | Next |
The Gnumeric worksheet is made up of three elements which are presented below. the section called “Data Entry Area” explains the use of the Data entry area, the area immediately above the worksheet area. the section called “The Cell Grid” explains the cell grid which is the area in the middle of the window and the area users spend the most time editing. Finally, the section called “The Information Area” explains the information area at the bottom of the worksheet where Gnumeric displays information about its current work.
Previous The Object Toolbar | Contents | Next Data Entry Area |
Previous | Next |
Immediately above the grid of cells is the data entry area as shown in Figure 4.22, “The Data Entry area.”.
This is a small area, which contains a current cell indicator, a cancel button, a confirm button, an entry button, and an entry area for detailed editing of the cell contents. These elements are explained individually below.
On the far left of the Data Entry area is the current cell indicator area. This area is shown in Figure 4.23, “The Current Cell Indicator.”
The cell indicator will show the address for the cell at the top left of the selected region. This address is listed in the standard column:row notation. The alphabetic part indicates the the column of this top leftmost cell and the numeric part indicates the row of this top left cell. For instance, the cell which is over three columns and down two rows is designated:
C2
This designation matches the column and row headers for this cell.
While a region is being selected, the current cell indicator will change to show the size of the region which is being selected. This information is presented in a row number by column number format. For instance, this designation:
15R x 6C
would indicate a selection area 15 rows high by 6 columns wide. Once the mouse is released at the end of the selection, the current cell indicator goes back to giving the address of the single top leftmost cell.
The Cancel button
can be used to cancel the current edit and to restore the cell
contents to the previous state. If a user decides in the middle
of an edit that the data being entered into a cell is not what
they want, the user can push this cancel button to cancel the
current data and return the cell to the state it was at before.
The most common use of this button is when overwriting the contents of a cell with new data. If the user decided to revert the change before confirming it, the cancel button is the answer. Note that this button works just like typing the escape key on the keyboard.
The confirm button
. can be used to finish the edit of a cell and
enter the edit into the workbook. Note that this button works
in the same way as the enter key.
The equals button
can be used to start a formula in the currently selected
cell. If a user wanted to make cell D10 equal to cell B4,
the user could simply click on cell D10, click this equals
button, click on cell B4 and type the enter key. Note that
this button works the same way as the equals key.
Previous The Elements of the Gnumeric Worksheet | Contents | Next The Cell Grid |
Previous | Next |
Most of the work done on a spreadsheet is done to the main Cell area, the large grid like part of the worksheet. This is where all the formulas and data are entered, and is the center of activity for the spreadsheet.
Figure 4.24, “The Cell Grid area, with cells of different sizes.” shows the the cell grid area, the column and row headers on the top and left, the scrollbars on the right and bottom and the tab list at the very bottom.
The figure has a few and shows that cell B3 as being selected. In this figure, the columns and rows have been resized and therefore look uneven.
Each cell in this area is delimited by a light grey line by default. The current selection is indicated by a rectangular box with a little box on the lower right, this case cell J12. The view in this figure shows the middle portion of a worksheet which is evident in two ways. Firstly, the column and row headers do not start at column A and row 1. Secondly, the scroll thumbs are not at the top and left. The thumbs are the boxes within the scroll bars that are used to scroll. Note also that cell D19 has a comment within it which is shown by the little red triangle at the top right corner.
The size of a cell is determined by the width of the column and height of the row that the cell is in. The columns and rows can be resized by acting on the header relevant to the cell. The user must move the mouse pointer to the edge of the header which is either to the right or below the cell. With the mouse pointer in this position, the pointer will change to a set of opposite pointing arrows. The user must then drag this edge away from the top left corner. This takes a little practice.
The cell area is the core of Gnumeric. Therefore the maual explains the use of cells in much greater detail in a separate section. Interested users should read Chapter 5, Working with Data.
The sheet is bordered by column headers on the top and row headers to the left. Columns are labeled alphabetically running horizontally across the top of the sheet as shown in Figure 4.25, “The column labels at the top of the worksheet.”.
Rows are labeled along the left side of the worksheet. Each label is a differrent integer increasing downward. This is shown in Figure 4.26, “The row labels at the left side of the worksheet.”.
The cell grid area's scrollbars work like other scrollbars. In this case they let the user work on a worksheet which is much bigger than what could be shown at any given moment.
At the bottom of Figure 4.24, “The Cell Grid area, with cells of different sizes.”, Gnumeric has a tabbed sheet indicator. This is the boxes with the labels "Guppies", "Turtles", "Mermaids", "seahorses" and so on. In workbooks where there are more than one sheet, extra tabs are used to indicate how many sheets are there, and also allows the user to move to another sheet by clicking the proper tab. Each tab is a link to a separte worksheet within Gnumeric. In this figure, the "Turtles" tab has been selected. Gnumeric shows this by making the "Turtles" since the tab is a little bigger and making it overlap the two neighbouring tabs.
On the far right, the two arrows indicate that there are more sheets in the workbook and more tabs for those sheets. Unfortunately, there is not enough space to show them all so Gnumeric displays these arrows. If all the sheets are visible, these arrows will not be displayed. These arrows can be used to scroll the tabs and bring tabs that were hidden into view. This may be a little difficult to understand and work with but becomes easier quickly.
Previous Data Entry Area | Contents | Next The Information Area |
Previous | Next |
The section at the very bottom of the worksheet view is the information area as is shown in Figure 4.27, “The Information Display Area.”.
The information area displays information depending on what is happening in Gnumeric.
The leftmost portion of the information display area, the part which reads: "Sort the selected cells" is a hint explaining what a menu does. In this case, the Data menu was opened and the pointer is hovering above the "sort" menu entry. Gnumeric is responding by giving a quick explanation of what that menu entry does.
Whenever Gnumeric opens or saves a file, the file staus indicator appears with a progress bar which grows as Gnumeric progresses. In Figure 4.27, “The Information Display Area.”, Gnumeric was just over halfway done opening a file.
In the bottom right hand corner, is an info area that shows some constantly calculated values. The default set is to show the Sum of all the currently selected cells.
There is a right click option that includes a few more options. This can include Sum, Min, Max, Average, Count.
Previous The Cell Grid | Contents | Next The Mouse Pointers used by Gnumeric |
Previous | Next |
The shape of the mouse pointer (the pointer which is moveable by the mouse) changes in different contexts. This indicates that different functionality is available and that mouse clicks will have different results. The different mouse pointers and the actions they indicate are discussed below.
The left hand pointing arrow pointer is the standard pointer used for most of the interaction with Gnumeric. This pointer is used to select menus and menu entries, toolbar buttons, columns or rows, the scrolling `thumbs' and various other elements.
This pointer appears over the cell grid area and can be used to select cells for editing.
The text editing pointer is used to indicate the location in the text where new edits will appear. This cusor can be used to change the scale of the zoom, to change the name and size of the font currently used or to edit the cell contents in the cell entry area (the white area to the right of the equals (=) sign.
The crosshair pointer can be used to change the cell selection area. The pointer appears when the mouse pointer is placed over the handle box, the black square at the lower right hand side of the selection. When the crosshair pointer appear, the selection can be altered by clicking the left-hand mouse button and dragging the handle to a new position. The cross hair pointer can also be used to insert a graphic object, by clicking with the left hand mouse button to place one coner and releasing the button to place another of the corners.
These pointers can be used to change the height of rows or the width of columns. These pointers appear in certain dialog windows to resize the different parts of the dialog. The pointers are also used to resize graphical objects as is explained below.
This pointer appears above the sheet tabs and can be used, by left clicking, to change the currently selected sheet or, by right clicking, to obtain the sheet dialog box. This pointer also appears above cells which are hyperlinks. Left clicking on a hyperlink may change the view to a new location, or may open an external file.
The right hand pointing arrow pointer is used to select graphical objects (such as drawing objects (e.g. arrows, ellipses) and graph objects (e.g. charts)).
The movement pointer can be used to move graphical objects around a worksheet without resizing the object.
These pointers allow the reising of graphical objects. If the mouse pointer is placed over one of the handle boxes of the graphical object, the handle box will turn green and the pointer will change to one of these forms. When these pointers appear, click dragging with the left mouse button will resize the graphical object either scaling or stretching the object.
These pointers are used to change the size of Gnumeric windows and dialogs.
Previous The Information Area | Contents | Next Working with Data |
Previous | Next |
This chapter explains the core functionality of Gnumeric including the basic types of data manipulated by Gnumeric, the methods of entering, manipulating and formating data, and the basic tools for analysis of these data. More advanced analysis is described in Chapter 6, Advanced Analysis.
Table of Contents
Previous The Mouse Pointers used by Gnumeric | Contents | Next Data in Gnumeric Cells |
Previous | Next |
The purpose of a spreadsheet is to manipulate data and perform calculations on those data. In order to understand how to use Gnumeric, it is necessary to understand what types of data are available and how these types can be manipulated.
Because all of the data which are entered into a Gnumeric workbook can eventually be stored in a file, the file contents define the kinds of data which can be entered into the spreadsheet. A file contains metadata about the file contents, global data for the workbook and the actual data contents of the workbook. The metadata include a brief document summary describing the file contents and include the settings applicable to the data contents, such as the settings for the printing of each sheet and any settings for automatically saving the file. The global data for the workbook include any names which are defined by the user and attributes, such as the protected status of the workbook and sheets. The actual data are contained in the worksheets and include the contents of the cells, both data and formatting, and other objects such as drawing and charts.
This chapter describes the information which can be stored in spreasheet cells. This includes the five types of data which cells can contain and the formatting which can be applied to each cell. The chapter first describes the five data types available, then describes the formatting which can be performed on each cell, then explains how data can be inserted into a spreadsheet and finally describes how to copy and move data around a worksheet along with the transformations which can be performed as the data are moved. This chapter does not describe other types of data which can be stored in a spreadsheet such as drawing elements and graphs used to chart data. These are explained in latter chapters.
Previous Working with Data | Contents | Next The Types of Cell Elements |
Previous | Next |
Each cell in a Gnumeric worksheet can contain only a single data element. These elements will have one of five basic types: text, numbers, booleans, formulas, or errors. During data entry, Gnumeric assigns a default data type to the cell based on an analysis of the cell contents. This assignment can be changed later if Gnumeric makes the wrong assignment. For information on how to change the data type of a cell, see the section called “Formating Cells”.
The five basic types of data which can be stored in a spreadsheet cell are:
A text element can contain a series of letters, numbers or other contents. For example, the first cell in a worksheet might contain the characters —This worksheet describes the company's income — which Gnumeric would interpret to be text. In order to distinguish text elements from number or formula elements, the text element may start with a single quote. For instance, if a cell contained only the three digits 345, Gnumeric would consider that to be the number three hundred and forty five. If this cell is intended to be a string, Gnumeric will store the cell as '345. The newline character cannot be entered directly but must be entered as Alt+Enter. For more information on entering and formating text elements, see the section called “Text Data Elements”.
A number element can contain a series of digits (425) but may include specific text and formatting characters to indicate negative numbers (-345), decimal separator (34.056), thousand separators (12,342), currency ($23), dates (21-10-1998), times (10:23) or scientific notation (2.3e12). Dates may include the names of months or their abbreviation. The currency, decimal separator and thousands separator symbols vary depending on the locale (the language and other location specific behaviour) to which Gnumeric has been set. See the section called “Configuring the Language and Local Settings of Gnumeric” to understand how to change the locale. If you want a number to be displayed as a plain string without any number formatting, you can put a single quote (') before it. For more information on entering and formating, numeric elements see the section called “Number Data Elements”.
A boolean element can contain one of two values: TRUE and FALSE. These are useful as inputs or outputs from formulas.
A formula is an instruction to Gnumeric which describes a calculation which should be performed automatically. These formulas can contain standard arithmetic elements but can also contain references to other cells. Calculations which depend on other cells are usually recalculated when the values of another cell changes. Formulas always begin with a special character — the equals sign (=). The comercial at symbol (@) can be used instead of the equals sign during data entry but Gnumeric will convert this to an equals sign. Alternatively, an entry which describes a calculation and which starts with either the plus (+) or minus symbol (-) will be converted to a formula starting with an equals sign. For a more complete explanation of formulas, see the section called “Formula Elements”.
A cell reference is the part of a formula which refers to another cell. For example, in the formula to add two cells =(A4+A1), both A4 and A1 are cell references. These references can be quite complex referring to cells in different worksheets or even in different files. See the section called “Cell Referencing” for a complete explanation of references.
An error element describes the failure to calculate the result of a formula. These values are rarely entered directly by a user but usually are the display given when a formula cannot be correctly calculated. See the section called “Error Elements” for a complete list of error values and their explanation.
![]() | Note |
---|---|
A cell may display a series of hash marks (######). This indicates that the result is too wide to display in the cell given the current font setting and the current width. The value in the cell can be seen in two ways. If the cell is selected, the value will appear in the data entry area (to the right of the equals button directly above the cell gridd). Alternatively, the cell can be widened until the data become visible. |
Text elements consist of an arbitrary sequence of characters entered into a cell. Text elements can contain any sequence of characters but, in order to distinguish text from other data types, text elements may have to start with an apostrophe symbol ('). These are the simplest elements to enter into spreadsheet cells.
An example of a spreadsheet cell grid with cells containing text is given in Figure 5.1, “A Text Data Element in a Cell.”.
Valid text entries include simple words, whole sentences and even paragraphs.
![]() | Note |
---|---|
To include a newline in a cell, a special key combination is required. An newline symbol can be inserted with the key combination of Alt+Enter. |
Number data elements include a variety of data all of which are stored and manipulated by Gnumeric as numbers. This includes integers, decimal fractions, general fractions, numbers in scientific notation, dates, times, and currency values.
Data are recognized as numbers when they are entered, dependant on the format of the sequence of characters entered. Gnumeric attempts to intelligently guess the subtype of the data and match the data to an existing format for numbered data. If it matches a data format, Gnumeric will automatically assign the datum to a data type and associate an appropriate display format with the cell.
The format recognition of Gnumeric includes a wide variety of data formats. Some examples are presented in Table 5.1, “Examples of Date Formats”.
Because Gnumeric automatically guesses the data type of a number being entered into a cell, this process may have to be over-ridden for ceratain types of data. For example, postal codes in the United States consist of a sequence of numbers which Gnumeric interprest as an integer. However, U.S. postal codes can start with a leading zero which Gnumeric discards.
Cells can contain boolean data elements. These elements arise from Boolean logic which is a branch of mathematics. These elements are useful for mainpulation of formulas.
Boolean values can be either "TRUE" or "FALSE". If these strings are entered into a cell, Gnumeric will recognize these as boolean values. These values can then be used in formulas. Certain formulas will also return boolean values.
Formulas are the key to making a powerful spreadsheet. A formula instructs Gnumeric to perform calculations and dsplay the results. These calculations are defined as a formula data elements. The power of these formulas arises because these formulas can include the contents of other cells and the results of the formulas are updated automatically when the contents of any cell included in the formula change. The contents of other cells are included using "cell references" which are explained below.
Any formula entered into a cell must follow a specific syntax so that Gnumeric can interpret the formula correctly. This syntax closely follows mathematical notation but also includes spreadsheet formulas, object names and cell references.
Formulas are distinguished from regular data by starting with an equals sign (=) as the first character. Everything following this equals sign is evaluated as a formula.
![]() | Alternate Beginnings for Formulas |
---|---|
To accomodate those more familiar with Lotus spreadsheets, Gnumeric recognizes the comercial at symbol (@) as the beginning of a formula and substitutes an equals sign. The plus and minus characters (+ and -) may also start formulas that involve calculation, but when used in front of a single number only indicate the sign of the number. |
The simplest formulas just use the standard math operator and symbols. Addition, subtraction, multiplication, and division are represented by +, -, *, and /, just as you would expect. +,- can be placed in front of numbers to indicate sign, as well.
Example 5.1. Examples of standard operators
=5+5 returns 10. =5-4 returns 1. =-5 returns -5. =5*5 returns 25. =(5*5)+11 returns 36. =(5*5)+(49/7) returns 32.
Formulas can result in error values in several instances. If a formula is entered incorrectly, Gnumeric will display a warning and allow either the formula to be corrected or will save the formula as text for editing later. If a syntactically correct formula results in a non-sensical calculation (for instance, a division by zero), then an error value will be displayed indicating the error.
Formulas can also contain functions which denote the use of standard mathematic, business, statistical, and scientific calculations. These functions take the place of any data element in a formula and can therefore be combined with the standard arithmetic opearators described above.
These functions have the form:
where FUNCTIONNAME indicates the name of a function and ARGUMENTS indicates one or more arguments to the function. The function arguments are separated by commas (,)
![]() | Tip |
---|---|
While the documentation generally refers to functions and to cells in capital letters, their use is not actually case sensitive. |
Some examples of the use of functions are:
Example 5.3. Some examples of function syntax
=SUM(A1,A2,A4,B5) =AVERAGE(A1:A16) =EXP(1) =PI() =3+4*MIN(A1,A2,B6)
The arguments of the functions vary in number from none, as in the PI() function, to an unlimited number, as in the SUM() function, depending on the type of function.
Formulas can include the displayed data from other cells. These contents are described as `cell references' which are names indicating that the contents of other cells should be used in the calculation.
Each cell in a spreadsheet is named by its column and row labels. The column labels are letters and the row labels are numbers. The first cell, therefore, is called A1. One column over and two rows down from cell A1 is the cell B3. The right most and bottom most cell is cell IV65536 which is the cell in column IV and in row 65536.
The value of a cell can be used in a formula simply by entering its name where a number value would otherwise occur. For example, to have the data in cell B1 appear in another cell, enter =B1 into that cell. Other more complex examples include:
Cells can be referenced in the default way (relative referencing), or by using absolute referening. Absolute referencing means that when the cell is copied, the cell reference does not change. Normally, autofilling a cell range or moving cell will change its cell reference to so that it maintains a relation to the original cell. Absolute referencing prevents these changes.
Example 5.5. Relative References
For example, if =A1 is the formula entered into cell B2, cell B2 will displat the data in cell A1, which is one row up and one column left. Then, if you copy the contents of B2 to cell F6, cell F6 will contain the value from E5, which is also one row up and one column left.
For the copied cell to still refer to A1, specify absolute references using the $ character: $A$1 refers to cell A1, no matter where it is copied.
The format for absolute cell refencing is to use a '$' in front of the cell coordinate that the you want to stay constant. The column, row, sheet, or any combination of these can be held constant.
Example 5.6. Absolute cell referencing examples
What happens when a given formula is entered into cell B2, then copied to other cells?
=A1 is a normal, or relative, cell reference function. When =A1 is entered into cell B2, it refers to the value of data one cell up and one cell left from the cell it is in. Therefore the value displayed in cell C2 will be the value of data in cell B1. Copied to cell R19, the formula will display the data in cell Q18.
In this case, the column value is absolute, but the row value is relative. Therefore, if =$A1 is entered into cell B2, the formula refers to the data in column A that is one row up from the current location. Copied to cell C2, the formula will refer to the data in cell A1. Copied to cell R19, it will refer to the data in A18.
This formula uses a relative column value and an absolute row value. In cell B2, it refers to cell A1 as the data in the cell one column left and in row 1. Copied to cell C3, the formula will display the data in cell B1.
No matter where this formula is copied, it will always refer to the data in cell A1.
Many functions can take multiple cells as arguments. This can either be a comma separated list, an array, or any combination thereof.
A comma separated list of cell references can be used to indicate cells that are discontinuous.
For functions that take more than one argument, it is often easier to reference the cells as a group. This can include cells in sets horizontally, vertically, or in arrays.
The ':' operator is used to indicate a range of cells. The basic syntax is upper left corner:bottom right corner.
It is possible to reference cells which are not part of the current sheet. This is done using the SHEETNAME!CELLLIST syntax, where SHEETNAME is an identifier (usually a sheet name) and CELLLIST is a regular cell reference as described in the previous sections.
Note that if SHEETNAME contains spaces, you need to quote the whole name to allow Gnumeric to group the separate words in SHEETNAME as single name. For example, you should use 'Name With Spaces'.
Names are labels which have a meaning defined by the user. Names can be defined to apply to a whole workbook or to a particular sheet in a workbook. Names can refer to a numeric value, to a particular range of cells, or to part of a formula. The name can be used wherever its meaning could otherwise be used.
Example 5.11. Examples of name usage
If myCellRange is defined as '$A$1:$B$500' and my_E_Constant is defined as 2.71828182845 then we can have:
=VLOOKUP (C1, "gnu", myCellRange, 2, 0) =LN(my_E_Constant) =SUM(myCellRange, my_E_Constant)
Names are defined using the Insert Name dialog. This allows manipulation of all the names in the related workbook. A name can have any form except that it cannot consist of a number, of the name of a sheet or of that of a function, since this would cause confusion.
In addition to the names defined by the user, Gnumeric has some pre-defined names for useful elements. These are:
"Sheet_Title:" this returns the name of the current sheet
It is periodically useful or necessary to have an expression return a matrix rather than a single value. The first example most people think of are matrix operations such as multiplication, transpose, and inverse. A less obvious usage is for data retrieval routines (databases, realtime data-feeds) or functions with vector results (yield curve calculations).
Example 5.12. Entering an Array Formula
An array formula is currently entered by selecting the single range in which to store the result, entering the array formula, and hitting the magic combination, Ctrl-Shift-Enter.
The result is displayed as :
={FUNCTION(ARGUMENTS)}(num_rows, num_cols)[row number][col number]
Previous Data in Gnumeric Cells | Contents | Next Data Entry. |
Previous | Next |
There are several ways to add data into a spreadsheet. The simplest data entry technique involves typing the data into a spreadsheet by hand. This is usually necessary the first time that data are introduced into a computer. If the data already exist in a computer file of some kind, a simple way might exist to insert these data into a Gnumeric worksheet. If the data are in a text file, they can be inserted into a worksheet rapidly using the text conversion facilities. If data exist in a spreadsheet file of a different format, Gnumeric may be able to open the file and the data can then be copied where they are wanted.
This section explains how to enter data by hand into a spreadsheet. The techniques necessary to obtain data from other computer sources are explained in Chapter 11, File Opening and Saving which deals with external data sources.
![]() | Warning |
---|---|
If the information being entered into Gnumeric cannot be interpreted correctly, Gnumeric will display an error message. The user may then be forced to edit the data before continuing. For example, a formula may be mathematically incorrect if the user has two operators in a row (e.g. =3+*4) and the diaolog will give the user the chance to re-edit the entry or accept the entry as text rather than as a formula. When the formula is corrected, the leading apostrophe can be removed and Gnumeric will re-interpret the entry as a formula. |
The simplest method to place data in a spreadsheet involves selecting the location for the data, typing the data on a keyboard and then typing the Enter key to finish the input.
Simple Data Entry
Select the cell where you want to enter data by clicking on it with the white cross cursor. This will place the thick `selection' box around that cell.
Type in the data or formula. The details of this step are presented below for each of the five types of data which can be entered.
Press the Enter key. This will complete the input and move the selection box down one cell which will then be able to recieve further input.
![]() | Tip |
---|---|
At any time while entering the data and before the Enter is pressed, the user can cancel the data entry by typing the Esc key. This will return the spreadsheet to the selection mode and restore the contents previously in the selected cell. |
![]() | Tip |
---|---|
Instead of the Enter key, other keys can be used to input the data in the current cell. These other keys will move the selection box to other locations than does the Enter key. The Tab key inputs the entry in the currently selected cell and then moves the selection box one cell to the right of the current cell. The arrow keys input the entry into the currently selected cell and move one cell in the direction of the arrow. The Enter key can also be used in conjunction with other keys. Typing the Shift+Enter combination will move the selection upwards after entry. Typing the Ctrl+Enter combination will re-select the currently selected cell. |
After selecting the cell and initially entering the data, the user is in a limited editing mode. The main key for editing mistakes in this mode is the backspace key.
For a more complete set of editing options, especially for longer entries, there is an advanced editing mode. To enter the advanced editing mode, press the F2 function key or click on the editing region. The keyboard focus will then shift from the current cell to the editing region at the top of the worksheet. There, you can use cursor keys to position the cursor within the data in the cell, and have all of the capabilities of the data entry area available.
For example, you can use:
Delete the character to the left of the cursor.
Move the cursor appropriately.
Delete to the end of the line
See the section called “Data Entry.” For more info on the data entry area.
![]() | Tip |
---|---|
All the normal key bindings for Gnome application entry boxes also apply in the data entry box. |
After finishing the data entry, pressing the Enter key will input the data entry and move the selection box downward just like for the simple editing mode.
Text can be entered by selecting a cell, typing the text and then typing the Enter key. Anything that is not interpreted to be a number, boolean, formula or error will be treated as a text field. To prevent Gnumeric from interpreting an entry as one of these other elements, a leading apostrophe can be added to force the entry to be text. Any entry, no matter what the contents, which starts with a leading apostrophe (') will be considered to be text.
![]() | Tip |
---|---|
Postal codes in the United States are series of five integers. By default, Gnumeric interprets these to be numbers. This interpretation means that the leading zeros used in the postal codes of the northeastern region will be lost by default. To retain these leading zeros, either the code should be entered with a leading apostrophe (e.g. '02917) or the cells should be formatted as text before data entry (see the section called “Formating Cells” for an explanation of formatting). |
Numbers can be entered like other items. First the cell in which the number should be entered must be selected, then a valid number must be typed in and finally the entry must be inserted using the Enter key. The valid formats for numbers are presented in the section called “Number Data Elements”.
A boolean can be entered by selecting the cell, typing the boolean (either TRUE or FALSE) and then typing the Enter key.
Formulas can be entered simply by typing a syntactically correct formula in a cell. The correct syntax for formulas is expalined in detail in the section called “Formula Elements”. Formulas begin with an equals sign (=) and contain arithmetic symbols, functions with their arguments and cell references.
To enter a formula, first the cell must be selected, then the correct formula must be typed, and finally the Enter key must be typed.
![]() | Warning |
---|---|
If the formula entered into Gnumeric cannot be interpreted correclty, Gnumeric will display an error message giving the user the choice of re-editng the formula or saving the formula as a text field to be edited later. For example, a formula may be mathematically incorrect if the user has two operators in a row (e.g. =3+*4). If the formula is saved as text, when the formula is corrected the leading apostrophe must be removed. Gnumeric will then re-interpret the entry as a formula. |
Formulas often include cell references or references to ranges of cells as arguments to functions. These references and ranges can be entered into a formula simply by typing in the proper syntax (see the section called “Cell Referencing” for more details). But manually entering in cell ranges is slow and cumbersome. In order to speed up the entry of these cell ranges, the mouse and the keyboard arrow keys can be used to select these cell ranges quickly.
When editing a formula, if the cursor is at a point where a cell refrerence or range would be approrite, the reference or range can be selected using the mouse. If the mouse is used to click on a cell, the refrence of that cell will be entered into a formula. Alternatively, if the mouse is used to drag a selection over a range of cells, that cell range will become part of the formula. The selected range will be highlighted by a border of moving black dashes, commonly called the "marching ants" border.
Using the mouse to enter cell references
Begin entering a formula as you would normally. Stop at the point where a cell reference is appropriate. For example, example, type =exp(
Click on the cell you want to reference. Its reference will be entered into the formula.
To finish the formula, just type in the closing parenthesis. This will also "unselect" the region.
The mouse can be used to select a single cell, a continous range of cells or several disjoint ranges of cells just like regular selections.
If entering lots of formulas or even just entering a few formulas, it is often quickest to use the keyboard to select cells and ranges of cells for use in formulas. Just as reaching a input point allows the user to select cells with the mouse, it is possible to use the keyboard to select cells. Just use the cursor keys and selection modifiers to create a selection.
Using the keyboard to enter cell references
Select a cell to enter a formula into. For example A1.
Enter a formula, but stop the cursor at a point where a cell reference is appropriate. For this example, =SUM(
Move the selection around with the cursor keys. Move the selection cursor to cell B1 to start the selection.
Hold down Shift and move the selection one cell over and one cell down. Cells B1,B2,C1,C2 should now be selected and the formula should show =sum(B1:C2
To finish the function, close the parenthesis. The cell should now show =sum(B1:C2). Press enter and the formula is entered.
To select a range of cell, hold Shift and move over the desired area.
To stop entering a selection or to start over, press Shift+Backspace
Errors are almost never entered directly into a spreadsheet but usually arise from problems which Gnumeric encounters during calculations. A list of errors with their meanings is presented in the section called “Error Elements”.
In an unusual case where it is needed, an error can be entered by hand like the entry of other elements. First the cell must be selected, then the error must be entered (e.g. #DIV/0!) and finally the Enter key must be pressed.
Previous The Types of Cell Elements | Contents | Next Advanced Data Entry. |
Previous | Next |
This section describes advanced methods for data entry in Gnumeric. This includes techniques useful when adding large amounts of data, methods to automatically catch mistakes during data entry, using pre-defined templates to format data input, obtaining data from external sources and generating sequences of random numbers with defined distributions.
It is sometimes necessary to enter large amounts of data by hand into a spreadsheet. To facilitate this work, Gnumeric provides several techniques to facilitate the entry of large amounts of data.
If data are to be entered into a series of rows or columns, this region can be selected ahead of time thereby modifying the behaviour of the data entry keys (the Enter, Tab and arrow keys).
Data entry into a region
Select the region with the mouse. For example, the region from cell C4 to cell E8 can be selected by clicking with the left mouse button on cell C4 and dragging the mouse cursor to cell E8. (More information on complex selections is presented below.)
Enter data by typing the data and the the Enter key. If this is done repeatedly, the fifth time the Enter key is pressed, the selection will not move to cell C9 but will jump up to cell D4.
![]() | Note |
---|---|
The Tab key can also be used instead of the Enter key to move sequentially through the selection. |
It is often necessary to enter a regular sequence of numbers or a repeated sequence of text. Gnumeric provides several ways to input series and sequences of this kind.
The simplest way to fill a series with the same element repeated involves entering the element once and dragging the selection box to fill that element repeatedly. For example, the text "employee:" could be input into cell C2. That cell could then be selected. The selection box is a thick white rectangle which surrounds the cell. This selection box has a small white square at the bottom right hand corner. If the mouse cursor is placed above this square box, it changes to a thin cross. If the left hand mouse button is clicked and held, and the mouse dragged to cell C10, Gnumeric will automatically fill all of the cells with the identical string.
An alternative way to enter data into a region involves first selecting the region, then typing the value and finally typing the Ctrl+Enter key combination. This will fill the whole region with the identical value which was originally entered.
A similar method is available to fill sequences of integers. If the example just given was altered so that cell C2 had the number 14 and the Ctrl key was held during the dragging of the selection, Gnumeric will automatically fill the cells C2 to C10 with the series 14,15,16,...,22.
More complex series and sequences of data can be entered with a similar mechanism.
To do an autofill:
Enter a value into the first cell you wish to autofill. For example, the cell C2 could have the number "24" entered.
Enter a second value into the second cell you wish to autofill. This must be adjacent to the first cell. This sets the increment to use when autofilling the rest of your cells. For example, the cell D2 could have the number "28" entered.
Select both the cells just entered. At the bottom-right of the selection should be a small box. Your mouse cursor will change to a cross-hair when placed over the box. Press and hold on the box. Drag in the direction, either vertical or horizonatal, you wish to increment and release when all the cells are filled. For example, selecting cells C2 and D2, then dragging the bottom right of the selection to cell I2 will fill the cells with the sequence from 24 to 48 with each increment being 4.
An alternative to the last step involves using the menus. Once the first two values have been input, the whole range to be filled can be selected using the mouse and then the Autofill selection can be made from the Edit and Fill. This will automatically complete the series in the selected region.
Gnumeric is able to increment several types of data beyond simple integers. The proceedure is the same as described above but involves different starting values. Gnumeric can increment:
1, 2, 3, etc.
1.03, 2.05, 3.07, etc.
Monday, Tuesday, etc.
Mon, Tues, etc.
January, February, etc.
Jan, Feb, etc.
Item1, Item2, etc
11/14/2001, 11/15/2001, etc.
Gnumeric supports incrementing the date by month, date, or year.
Note that, While Gnumeric will increment days of the month, if you do 11/14/2001 and 12/14/2001, it will recognize it as the same day of the month and increment the month so the next value would be to 1/14/2002 instead of the day difference.
Gnumeric can be explicitly told the cells to autofill as in the examples above, but it can also guess the number of cells to fill based on the length of an adjacent column or row. For example, if the cells B2 to B10 have information and cell C2 has the integer value "1", then selecting cell C2 and double clicking on the bottom rightmost box of the selection rectangle will fill the value "1" from cell C3 to cell C10.
The entry of large amounts of data into a spreadsheet is tedious work which is prone to repeated mistakes. Gnumeric provides a tool to automatically correct commonly made simple mistakes. The corrections are configured and activated using AutoCorrect Dialog, available via Auto Correct in the Tools menu.
A common mistake is to hold down the shift key a little bit too long while typing initial letters. When it happens, you will get two initial capitals instead of one. If this correction rule is activated, the second letter of words beginning with two capital letters is automatically lowercased. For example, if you type `TOtal' into a cell it is replaced by `Total'. Note that if the word contains two capital letters only, it is not replaced.
It is possible to specify exceptions to this tool. For example, you do not want the tool to replace the word `PVbonds' when it is typed. To specify exceptions, press the ``Exceptions...'' button in the dialog. This should pop up the ``Auto correct exceptions'' dialog. In this dialog, select the ``INitial CApitals'' page. In this page, type `PVbonds' into the ``Do not correct'' entry, and press ``Add'' button. Now the word should be included in the list of exceptions. To remove a word from the list, select the word and press the ``Remove'' button. If you now press ``Ok'' the exceptions in the list are activated.
If this correction rule is activated, the first letter of a sentence typed into a cell is capitalized, if it is a lowercase letter in the first place. Only text that ends to a dot is considered a sentence.
It is possible to specify exceptions to this tool. For example, you do not want the tool to capitalize letters after acronym `i.g.'. To specify exceptions, press the ``Exceptions...'' button in the dialog. This should pop up the ``Auto correct exceptions'' dialog. In this dialog, select the ``First letter'' page. In this page, type `i.g.' into the ``Do not capitalize after'' entry, and press ``Add'' button. Now the word should be included in the list of exceptions. To remove a word from the list, select the word and press the ``Remove'' button. If you now press ``Ok'' the exceptions in the list are activated.
Use the random number generation tool to generate random numbers. This tool can generate random numbers from various probability distributions.
Specify the number of variables in the “Number of Variables:” entry. This determines the number of columns of random values to be produced.
Specify the number of random numbers for each variable in the “Size of Sample:” entry. This determines the number of rows of random values to be produced.
Specify the random distribution by selecting one of the items from the random distribution list. The following random distributions are supported: Discrete, Normal, Poisson, Exponential, Binomial, Negative Binomial, Bernoulli, and Uniform.
Specify the parameters of the selected distribution:
Specify the value and probability input range in the “Value and Probability Input Range:” entry box. The value and probability input range is a table consisting of two columns and any number of rows. The first column specifies the discrete random values and the second column the probabilities for them. The discrete random values do not have to be numbers, for example, strings will do as well. The sum of the probabilities in the second column should be one. For example, if you have the values A, B, C, and D in A1:A4 and values 0.1, 0.4, 0.2, and 0.3 in B1:B4, you would specify the value and probability input range to be A1:B4.
![]() | Note |
---|---|
If the probabilities do not add to 1, they will be automatically scaled. |
Specify the mean and the standard deviation. The default values are 0 for the mean and 1 for the standard deviation.
Specify the lambda in the “Lambda” entry. Lambda is the average number of events in a unit time interval.
Specify b in the “b Value” entry.
Specify the probability of success (p) in the “p Value” entry and the number of trials (n) in the “Number of Trials” entry. The Binomial distribution is a discrete distribution in which the experiment consists of n identical trials. Each trial is independent of other the trials and has two possible outcomes, a success or a failure. The probability of success p is constant from one trial to another. The mean of a random variable that has a Binomial distribution is E(X) = np, and the variance is var(X) = np(1-p).
Specify the probability of success p in the “p Value” entry and the number of failures r in the “Number of Failures” entry. Negative Binomial distribution is a discrete distribution in which the experiment consists of a sequence of independent trials. Each trial has two possible outcomes, a success or a failure. The probability of success p is constant from one trial to another. The experiment continues until r failures are observed, where r is fixed in advance. The mean of a random variable that has a Negative Binomial distribution is E(X) = r(1-p)/p, and the variance is var(X) = r(1-p)/p^2.
Specify the probability of success (p) in the “p Value” entry. p is a probability value between 0 and 1. The Bernoulli distribution has two random values 0 and 1, and p is the probability to observe value 1. The mean of a random variable that has a Bernoulli distribution is E(X) = 1(p) + 0(1-p) = p, and the variance is var(X) = p(1-p).
Specify the range of the continuous random variable with the “Between:” and “And:” entries. The default values for these entries are 0 and 1.
Example 5.13. Using the Random Number Generation Tool
Figure 5.5, “Some Example Data for the Random Number Generation Tool” shows some example data and Figure 5.6, “Random Number Generation Tool Output” the corresponding output.
Previous Data Entry. | Contents | Next Obtaining Data from External Sources |
Previous | Next |
Data are commonly obtained from external sources such as from other files, either in a spreadsheeet format or in delimited text format, from other applications using the mouse to copy and paste data or from external applications such as databases or internet data streams.
Data which already exist in an external file can be imported into a workbook first by opening the file into a separate instance of gnumeric and and then by copying the relevant data into the desired worksheet.
Data contained in external files in the formats of several other spreadsheet applications can be opened by gnumeric. Gnumeric can open files in Applix (TM) format, GNU Oleo format, Lotus 123 (TM) format, Microsoft Excel (TM) format, Multiplan (TM) format, OpenOffice Calc or StarOffice Calc (TM) format, Plan Perfect (TM) format, Quatro Pro (TM) format, sc and XSpread format or in the Xbase format.
Data contained in external text files which are formatted in well defined ways can also be opened by gnumeric. Gnumeric can open files formatted in Data Interchange Format, formatted as HTML tables, or formatted in text formats such as comma separated values or tab delimited records. The opening of text format files is configurable by the user so that text files which contain data formatted in a wide variety of schemes can be imported correctly into gnumeric. Obtaining data from these files is explained in detail in the section titled the section called “Opening and Importing Files”.
Data which are opened into a separate instance of gnumeric can be copied and pasted into the current worksheet with the copy and paste commands as explained in the section called “Cut, Copy and Paste”.
Data can be obtained from other Gnumeric workbooks or other applications using the mouse to copy data and paste them into a worksheet. This is explained below in the section titled the section called “Cut and Paste Between Gnumeric and Other Applications”.
Gnumeric has been connected to external data sources such as stock quotation service data streams using an experimental plugin. This requires the ability to write programming code. Information on extending gnumeric by developing plugins can be found in the section called the section called “Writing New Plugins” and the actual computer source code can be found in the directory gnumeric/plugins/sample_datasource/ of either a distribution of gnumeric or in a code checkout from the concurrent versioning system (CVS) repository.
Previous Advanced Data Entry. | Contents | Next Selecting Cells and Cell Ranges |
Previous | Next |
By selecting multiple cells at once, common operations can be performed on all the cells which have been selected. These operations include data entry, copying the cells, and multiple other operations .
The simplest selection involves a single cell. Simply clicking with the left hand mouse button while the mouse cursor is over a cell will cause that cell to become selected.
The selected cell is indicated by a dark double line with a small square in the bottom right corner. The selected cell is the the one that is currently in focus and will take any input for the keyboard.
To make a cell become the selected cell, simply move the white-cross cursor over the cell and press the left mouse button.
Several cells can be selected at once. The selection of multiple cells is indicated by a dark double line around the extents of the selection. The top-left cell appears much like a single selected cell while the rest of the selection is the inverse color.
To make a continuous selection of cells, click on the cell with the white_cross cursor and drag the extents of the selection until it comprises the area you wish to select, and release.
The quickest way to make large selections, especially when your already using the keyboard is to just use the keyboard selection tools. The basic use is to press Shift+arrow keys to make a new selection.
To select an entire row of cells, press Shift+space. This is equivalent to pressing the row label button on the left side of the sheet.
To select an entire column of cells, press Ctrl+ Space . This is equivalent to pressing the column label button on the top of the sheet.
To select the entire sheet, press Ctrl+A. This is equivalent to pressing the button in the top left corner of the sheet.
Shift+Arrow : Define selection with cursor keys.
Ctrl+Arrow : Jump to the end of the current region.
Alt+Space : Select current row.
Ctrl+Space : Select current column.
Ctrl+A : Select the entire sheet.
Ctrl+/ : Select the array formula arround the current edit position.
Previous Obtaining Data from External Sources | Contents | Next Moving and Copying Data |
Previous | Next |
Data which have been entered once into a spreadsheet can be moved to new locations and possibly duplicated. The simplest way to do this involves dragging the selection box. A more advanced way involves a formal cut or copy operation and then a paste operation in the new location. The latter approach allows the data to be modified as they are pasted which can be extremely important.
![]() | Tip |
---|---|
It is frequently necessary to copy the results of complex calculations into a new location. This is done by selecting the data and using the As Value command from the Paste Special... dialog. This is explained in the section called “Paste Special” below. |
The easiest way to move or copy a cell or a group of cells is by selecting the cell or cells to be moved or copied, then using the mouse to drag the selection box to a new location.
Select a cell to move by clicking in it. You can also select a range of cells as described in the section called “Selecting Cells and Cell Ranges”.
Click Ctrl+ mouse button to copy cells.
mouse button on the border of the selection (anywhere except the autofill square in the bottom right corner). Use mouse button to move cells orDrag the selection to the new location.
Release the mouse button.
The selected cells will be copied or moved to the new location. This will move both cells' content and formatting. When copying, relative cell references in all formulas will change as described in the section called “Cell Referencing”; when moving, relative cell references will remain unchanged.
Another, more flexible, way to copy or move a selection is to use cut, copy, and paste operations. These operations allow the user to copy or move selected cells to the clipboard buffer and then paste the contents of the clipboard buffer to a different location or a different workbook.
To cut a cell or a selection to the clipboard, you should select a cell or range of cells as described in the section called “Selecting Cells and Cell Ranges” and then use one of the following methods:
Use keyboard shortcut Ctrl+X.
Choose Cut from the Edit menu.
Click on
Cut button in the toolbar.
Right-click on the selection and choose Cut from the context menu.
The selection will be copied to the clipboard buffer. To remind you of this, the border of the selection will be shown as "marching ants". The selection will be moved to a new location as soon as you choose Paste command as described below.
![]() | NOTE |
---|---|
Please note that the selection will remain in its current location until you paste it. If you want to delete a selection without pasting it to a new location, use Delete command instead. |
To copy a cell or a selection to the clipboard, you should select a cell or range of cells as described in the section called “Selecting Cells and Cell Ranges” and then use one of the following methods:
Use keyboard shortcut Ctrl+C.
Choose Copy from the Edit menu.
Click on
Copy
button in the toolbar.
Right-click on the selection and choose Copy from the context menu.
The selection will be copied to the clipboard buffer. To remind you of this, the selection will outlined by "marching ants" border. The selection will be copied to a new location as soon as you choose Paste command as described below.
To paste the contents of the clipboard (i.e., previously cut or copied selection) to a new location, just click on a cell and use one of the following methods:
Use keyboard shortcut Ctrl+V.
Choose Paste from the Edit menu.
Click on
Paste
button in the toolbar.
Right-click on the cell and choose Paste from the context menu.
The contents of the clipboard will be pasted in the spreadsheet so that the selected cell becomes the top left corner of the selection. This will also copy the formatting of the original selection.
If you are pasting a selection which was copied to the clipboard buffer, all relative cell references in all formulas will change as described in the section called “Cell Referencing”. The selection remains in the clipboard buffer so that it can be pasted again. The original selection will remain outlined with "marching ants" border.
If you are pasting a selection which was cut to the clipboard buffer, all cell references in all formulas will remain unchanged. The original selection will be removed from the workbook and the clipboard buffer will be cleared.
All of the methods described above to move or copy data create identical copies of the original cells in the new location. This means that both the contents and the formatting of the original selection are copied to the new location and also means that any data present in the new location are deleted. It is frequenly important either to alter the data before it is pasted or to merge the data in the new location with the data being pasted. The Paste Special... command enables this.
The Paste Special... command can act exactly like the Paste command or may selectively paste the cell contents, the cell formats, the calculated values of the orginal cells rather than their contents. described in the previous section copies both contents and formatting of the orignal selection. If you need more options, use Paste Special... command.
The Paste Special... command can be accessed, after a selection has been cut or copied as explained above, in one of two ways. First, the location where the pasting should happen must be selected. The easiest way to do this is to select the single cell which will be at the top left hand corner of the region of pasted cells. Alternatively, the exact region into which the cells will be copied can be slected. After the selection is made, the Paste Special... command can be chosen from the Edit menu or the context menu obtained by clicking with the right mouse button in the cell area of the spreadsheet.
The Paste Special... menu item opens a dialog with three categories. By default, Paste Special... acts as if it were the Paste menu item.
The first set of choices allow the user to control the data pasted.The user can chose to limit the pasting to only the cell contents (no cell formatting is copied) or the opposite only cell formats copied (no contents). Furthermore, the user can insert the selection while transforming all the contents into values only. Formulas will be replaced by their values.
A second set of choices allows the user to perform simple mathematical operations during the paste. These operations use the current contents of the cells in the paste range and the contents of the clipboard. For example, if you are pasting a cell containing number 5 to a cell that currently contains number 10 and choose option Divide, the result will be 10/5=2. Choosing option None will just replace the previous contents of the cells by the contents of the clipboard buffer (this is the default behavior).
The final choices contains the following options:
Transpose. This option will transpose the selection, i.e. interchange the rows and columns. Thus, a range with k rows and n columns will become a range with n rows and k columns, so that the firs row becomes the first column, and so on.
Skip Blanks. This option prevents Gnumeric from taking any action for the cells in the selection that are blank. For such cells, the existing contents of the cells in the paste range will be kept.
Cut and paste commands described above allow copying and moving selections from one location in a spreadsheet to another, or between different spreadsheets. However, you can also use cut and paste to exchange information between Gnumeric and other applications, using so-called X clipboard which is shared by all graphical applications.
Whenever you cut or copy a selection in Gnumeric, it is placed both in Gnumeric clipboard and in X clipboard. In X clipboard, it is placed as text, with formulas replaced by their values and contents of different cells separated by spaces.
To paste the selection from X clipboard to an application, click with middle mouse button (if you have two button mouse, you can emulate the middle mouse button by pressing left and right buttons simultaneously). Most applications also allow pasting from X clipboard by using keyboard shortcut (usually Ctrl+V) or by choosing Edit->Paste.
To paste a selection from another application to Gnumeric, place this selection in the X clipboard. Usually it is done by just selecting it with the mouse; some applications also allow you to use keyboard shortcut Ctrl+C, or choose Edit->Copy. After this, you can paste it in Gnumeric by using Paste command described above. This command will automatically paste the contents of X clipboard if Gnumeric's own clipboard is empty.
Pasting X clipboard in Gnumeric will automatically launch the Text Import druid which will assist you in imporitng the plain text contents of X clipboard into the spreadsheet. The Text Import druid is described in the section called “The Text Import Druid”.
Previous Selecting Cells and Cell Ranges | Contents | Next Deleting Data |
Previous | Next |
Previous Moving and Copying Data | Contents | Next Inserting New Data Cells |
Previous | Next |
Previous Deleting Data | Contents | Next Formating Cells |
Previous | Next |
Cell formats allow you to change the way cell data appears in the spreadsheet. It is important to keep in mind that it only alters the way the data is presented, and does not change the value of the data.
The formatting options allows for monetary units, scientific options, dates, times, fractions,and more. Positive and negative values can have different colors and formats for aiding in keeping track of values. There are also a large variety of date and time formats for virtually any time and date format one can think of. Formatting also allows you to set font, background color, and borders for selected cells.
Finally, advanced formatting options allow you to lock some of the cells so that their values cannot be changed, or restrict the range of values that can be entered in the selected cells.
To change the formatting of a cell or a selection, you can either use the Format Cells dialog which holds all of the formatting options or use specific formatting elements available as buttons on the Format Toolbar.
This dialog, shown in Figure 5.15, “Format Cells Dialog”, gives you access to all formatting options.
To launch this dialog, select the cell or range of cells you want to format (see the section called “Selecting Cells and Cell Ranges” for details on selecting cells) and then use one of the following methods:
Use keyboard shortcut Ctrl+1 (this is number one, not letter l).
Choose Format->Cells... in the menubar.
Click with the right mouse button on the cell grid area and choose Format Cells... from the context menu.
The Format Cells dialog contains tabs Number, Alignment, Font, Border, Background, Protection, and Validation. These tabs are described in detail in the subsequent sections.
To set one of formatting options, select the corresponding tab, choose the options you need, and click OK. This will apply the options you selected (in all tabs) and close Format Cells dialog. You can also click on Apply to apply the and keep the dialog open, or on Close to close the dialog without applying changes.
Some of the most commonly used formatting options, such as font, background, and alignment, can also be accessed by using the buttons in the Format Toolbar. This toolbar is described in detail in the section called “The Format Toolbar”,
This tab allows you to select the format for the cell's contents. You can select one of the many preset formatting styles which should be be more than adequate for the vast majority of cases. If none of these meet the needs of the user, it is possible to create your own formats.
To use one of the preset formats, select the format category (such as Number or Date) by clicking on the corresponding radiobutton in the left side of the dialog. The right side of the dialog will show you how the selected cell would look with this format and give more options for the selected format.
The following is a list of all available format categories:
A swiss army knife of a format. It will attempt to display a value it the 'best' way possible. The choice of format depends on the size of the cell and Gnumeric guess of what 'type' of value is being displayed (number, date, time ...).
Displays numbers with 0-30 digits after the decimal place. Negatives can be displayed normally, within parentheses, or in red color. Optionally a delimiter can be added every third order of magnitude (thousand, million, ...). Both the decimal point and the thousands separator have internationalization support.
Similar to Number, with the addition of a currency symbol. Currently known symbols include $, ¥, £, € and the three letter abbreviations of all major currencies. By default, Gnumeric will use currency symbol and placement (before or after the number) appropriate for your locale.
A specialization of Currency which pays more attention to the alignment of negative numbers. It ensures that a small amount of space is prepended to positive numbers so that they align with negatives.
This category contains various formats for presenting dates. By default, Gnumeric will use date format appropriate for your locale (country and language setting). You can also choose one of many possible date formats shown in the list in the right side of the dialog. The following is an explanation of codes used in these formats:
d: day of month (one or two digits). Example: 9.
dd: day of month (two digits). Example: 09.
ddd: day of week. Example: Wed.
m: month (number, one or two digits). Example: 3.
mm: month (number, two digits). Example: 03.
mmm: month (abbreviated name). Example: Mar.
mmmm: month (full name). Example: March.
yyyy: year (four digits). Example: 1967.
yy: last two digits of year. Example: 67.
Some date formats also include time using the codes explained below. Examples of date formatting are shown in Table 5.1, “Examples of Date Formats”.
This category contains various formats for presenting time of day. You can choose one of many possible time formats shown in the list in the right side of the dialog. The following is an explanation of codes used in these formats:
h: hours.
mm: minutes.
ss: seconds.
Sometimes it is necessary to display more than 24 hours, or more that 60 minutes/seconds without the values incrementing the display unit of the next larger measure (e.g., 25 hours instead of 1 day + 1 hour). To achieve this, use codes '[h]', '[mm]', and '[ss]'. Examples of time formatting are shown in Table 5.2, “Examples of Time Formats”.
Multiplies a value by 100 and appends a percent. Can be used with 0-30 digits after the decimal place.
Approximate the value with a rational number with either a specific denominator or with a maximum number of digits in the denominator.
Formats the value using scientific notation, e.g. 5.334 E 6 for 5,334,000. Allows up to 30 digits after the decimal place. No provision for controlling the exponent are provided at this time.
Treats numeric values as text. This will show a number with as much precision as available and will lose knowledge of whether it represented a date, or time.
![]() | TIP |
---|---|
If your workbook contains serial numbers, ID numbers or other similar entries, choose Text format for them. If you choose General or Number format, Gnumeric will remove leading zeros, so that 01124 will be shown as 1124. |
This category allows you to define your own format. This is only recommended for advanced users as it requires understanding of the codes internally used by Gnumeric for describing formats. To make it easier, this category provides a list of codes for all predefined formats so you can create our own format by modifying one of them rather than starting from scratch.
Table 5.1. Examples of Date Formats
Format | Sample | ||
---|---|---|---|
General | 36068.755 | ||
m/d/yy | d/m/yy | 9/30/98 | 30/9/98 |
m/d/yyyy | d/m/yyyy | 9/30/1998 | 30/9/1998 |
d-mmm-yy | mmm-d-yy | 30-Sep-98 | Sep-30-98 |
d-mmm-yyyy | mmm-d-yyyy | 30-Sep-199 | Sep-30-9198 |
d-mmm | mmm-d | 30-Sep | Sep-30 |
d-mm | mm-d | 30-09 | 09-30 |
mmm/d | d/mmm | Sep/30 | 30/Sep |
mm/d | d/mm | 09/30 | 30/09 |
mm/dd/yy | dd/mm/yy | 09/30/98 | 30/09/98 |
mm/dd/yyyy | dd/mm/yyyy | 09/30/1998 | 30/09/1998 |
mmm/dd/yy | dd/mmm/yy | Sep/30/98 | 30/Sep/98 |
mmm/dd/yyyy | dd/mmm/yyyy | Sep/30/1998 | 30/Sep/1998 |
mmm/ddd/yy | ddd/mmm/yy | Sep/Wed/98 | Wed/Sep/98 |
mmm/ddd/yyyy | ddd/mmm/yyyy | Sep/Wed/1998 | Wed/Sep/1998 |
mm/ddd/yy | ddd/mm/yy | 09/Wed/98 | Wed/09/98 |
mm/ddd/yyyy | ddd/mm/yyyy | 09/Wed/1998 | Wed/09/1998 |
mmm-yy | Sep-98 | ||
mmm-yyyy | Sep-1998 | ||
mmmm-yy | September-98 | ||
mmmm-yyyy | September-1998 | ||
d/m/yy h:mm | m/d/yy h:mm | 9/30/98 18:07 | 30/9/98 187:07 |
d/m/yyyy h:mm | m/d/yyyy h:mm | 9/30/1998 18:07 | 30/9/1998 187:07 |
yyyy/mm/d | 1998/09/30 | ||
yyyy/mmm/d | 1998/Sep/30 | ||
yyyy/mm/dd | 1998/09/30 | ||
yyyy/mmm/dd | 1998/Sep/30 | ||
yyyy-mm-d | 1998-09-30 | ||
yyyy-mmm-d | 1998-Sep-3 | ||
yyyy-mm-dd | 1998-09-30 | ||
yyyy-mmm-d | 1998-Sep-30 | ||
yy | 98 | ||
yyyy | 1998 |
This tab allows you to set horizontal and vertical alignment and justification options.
Horizontal justification options.
The standard default justification. Use right justification for numbers and formulas, and left justification for text strings.
Left justify all cell contents.
Center all cell contents.
Right justify all cell contents.
Fill the cell with the contents. This will repeat the cell's contents as necessary to fill the width of the cell.
For text, wrap long lines of text and left justify. For other formats, same as Left.
Centers the cell's contents so the middle of each line is aligned with the middle of other lines. This only works with multiple cells.
Left and Right justification options also allow you to specify indent from left (respectively, right) side of the cell. Indent is measured in multiples of the current font size: for font size 10, indent 4 means 40 pts.
Vertical Justification Options
Align the top of the cells contents with the top of the cell.
Center the cells contents vertically. Equally space between the top and bottom.
Align the contents of the cell with the bottom of the cell.
For text, wrap long lines and spread lines of text evenly to fill the cell. For other formats (or if the text contains no long lines), same as Bottom justification.
This tab allows you to change the font used for cells content.
To change cells font, select font family (such as Times, Helvetica, etc), style (Normal, Bold, ...) and size in points. You can also select font color and special effects such as underlining or strikethrough.
Gnumeric allows you to use any of the fonts known to GNOME printing system, gnome-print. The same fonts are used for screen display and for printing, assuring that the printed document will look identical to the one you see on screen. Advanced users can refer to documentation for gnome-print package to find out more about adding fonts and font management in GNOME.
![]() | TIP |
---|---|
A quicker way to change the selected cells' font is to use Format Toolbar. |
This tab allows you to choose the border for the selected cells. You can select one of many border styles (none, single line, double line,...) and colors. You can also have different borders on different sides of the cell.
To choose a border for a cell or a selection, select border style and color in the right side of the tab and click on the buttons corresponding to the sides of the cells in the left side of the tab. In addition to the buttons for left, right, top, and bottom sides, you also have buttons for drawing diagonal and reverse diagonal of the cell. (Strictly speaking, these cannot be called borders, but it is natural to put them in this tab.) The lowest row of buttons contains buttons None and Outline. Clicking on None removes all borders from the cell; clicking on Outline puts border on all sides of the cell or selection.
Please note that for a selection of cells, the buttons will put borders on one of the sides of selection, not of individual cells. For example, clicking on Bottom button will put the border along the bottom of the selection, so only the cells in the bottom row will be affected. In addition for selections you have three more buttons in the bottom row: Inside vertical, Inside, and Inside horizontal. Inside vertical puts borders on all inside vertical borders in the selection; Inside horizontal puts borders on all inside horizontal borders in the selection, and Inside puts borders on all inside borders in the selection, both vertical and horizontal.
To remove an existing border from one of the sides of a cell or selection, click on the corresponding button again.
This tab allows you to change the background of selected cells. You can choose solid color or patterned background. A preview of the selected background will be shown in the right part of the tab.
To select a solid color background, select the color from Background Color drop-down box. You can use of the standard colors or define your own color by clicking on Custom Color button.
To select a patterned background, choose the background color in Background Color section. After this, choose the pattern color and type in Pattern section. Please note that the pattern type buttons use black pattern on white background, regardless of the colors you have chosen.
To remove pattern, choose Solid pattern type (top left button, looking like a white square).
These two tabs are used to control user's access to cells and restrict values of data allowed in a cell. Unlike other formatting options, these two tabs have no effect on a cells appearance. These options are mostly used for writing templates and forms to be filled by others.
This tab allows you to see and change cell protection in imported Excel workbooks. Cell protection has no effect in Gnumeric: you can edit cells whether or not they are marked as protected. However, Gnumeric keeps the protection setting of imported Excel workbooks. If you later save your workbook in Excel format, Gnumeric will save the protection information too. For more information about cell protection in Excel, please refer to Excel documentation.
This tab allows you to set restrictions on allowed values of data in the cells. If you (or someone else) attempts to enter a data that does not meet the set criteria, a warning (or an error message, depending on the options set in this tab) will be shown.
This tab consists of two part. The first part, Criteria is used to set the criteria for the cell values. The second part, Error Alert, is used to choose the action when data entered does not meet the criteria.
To set the criteria for cell values, follow these steps:
Choose the type of data contained in the cells, using the Allow drop-down list.
Choose a condition that must be satisfied by the cells value, using Condition drop-down list. In these conditions, val stands for the cells value (for text, val stands for the length of text string) and min, max, and bound are constants that you need to specify.
Enter the values of constants used in condition. For example, if you chose condition min<=val<=max , you need to enter values of constants min and max.
After specifying the criteria, you need to specify how Gnumeric should respond to incorrect cell value. You can choose one of four possible actions from Action drop-down list:
Accept invalid value without any warning. Equivalent to having no validation.
Do not accept the invalid value. Show the user an error message which you need to specify (see below).
Show the user a warning dialog, giving him a choice whether to accept or reject the invalid value. You need to specify the message to use in the warning dialog (see below).
Accept invalid values but show the user a warning dialog. You need to specify the the message to use in the warning dialog (see below).
If you choose one of the options Stop, Warning, or Information, you must enter the message that will be show to the user in the error or warning dialog. Otherwise, the dialog will be empty so it will be completely useless. You need to enter the title (which will be used as the window title for the dialog window) and the message itself. For example, the values shown in the section called “Validation Tab” will produce the dialog shown in Figure 5.22, “Warning dialog in response to invalid input”.
Previous Inserting New Data Cells | Contents | Next Modifying Data |
Previous | Next |
This section has not yet been written...
With data shuffling tool you can shuffle data in a given cell range. The tool can be started by selecting ``Shuffle'' menu item in ``Data'' menu. In order to use the tool give the input range in which the data to be shuffled is stored. The tool is able to shuffle the contents of the whole cell range, or, also shuffle data according to rows or columns. The shuffling method is selected under the ``Input Range'' entry. For example, if your data is groupped by rows then select ``Shuffle Method'' ``Rows''.
The default output method is to shuffle in-place. The shuffled data can also be written into a new sheet, new workbook, or into an existing sheet by giving the output range. If you select the ``Autofit Columns'' option, the width of each output column is automatically fixed according to the size of data in it.
With data filters you can select a subset of rows in the worksheet that meet the given criteria. You can, for example, copy rows of a table containing sales of departments whose profit has been exceptionally high into a new sheet simply using a filter.
To use advanced filter, you should have a few blank rows available in your worksheet to be used as a criteria range. These rows should not overlap with the rows in the table to be filtered.
Now copy all the column labels from the table you want to filter into the first blank row in the criteria range. Below the criteria labels, you can now type the conditions you want to match for the particular label. For example, under a label `Profit' you could type `>=1000'. The tool selects only rows that match all the criteria.
It is possible to have many conditions for a single label. For example, you can select the departments whose profit is either very high or very low. To do this, type, for example, `<=0' below the `>=40000' condition.
To start the tool, select ``Advanced Filter'' from the ``Data'' menu. It brings you the advanced filter dialog. In the dialog, select the action you want to take.
``Filter in-place'' writes the new table in-place. Note that you will loose all the rows in the table that will not match the criteria. ``Copy to a new location'' copies the selected rows into the same sheet but into the specified cell range. Type the cell range into the ``Copy to'' entry if you want this action to happen. The other options let you to copy the selected rows into a new sheet or a new workbook.
You should then specify the cell range containing the table to be filtered in the ``List range'' entry. The cell range containing the criteria is specified in the ``Criteria range'' entry. If the original table contains duplicate rows, you may also want to specify the ``Unique records only''. If it is checked on, the filter removes all duplicates.
To start the tool, you can then click the ``OK'' button and you will get the new table.
Previous Formating Cells | Contents | Next Generating Data |
Previous | Next |
Previous Modifying Data | Contents | Next Adding a Comment to a Cell |
Previous | Next |
Previous Generating Data | Contents | Next Adding a Hyperlink to a Cell |
Previous | Next |
Previous Adding a Comment to a Cell | Contents | Next Advanced Analysis |
Previous | Next |
This chapter explains many of the advanced analytic tools available in Gnumeric including statistical analysis, linear algebra calculations and simulation analysis.
Previous Adding a Hyperlink to a Cell | Contents | Next Advanced Analysis in Gnumeric |
Previous | Next |
There are several kinds of analysis which can be performed using the Gnumeric spreadsheet. These include statistical analysis and linear programming methods. These are described in this chapter.
Previous Advanced Analysis | Contents | Next Analysis using Complex Numbers |
Previous | Next |
Complex numbers can be used in Gnumeric but, because they are not fundamental types, all the analysis must be done with functions.
Previous Advanced Analysis in Gnumeric | Contents | Next Goal Seek Tool |
Previous | Next |
Use Goal Seek Tool to search for a value of a single model variable that yields a given desired value of another single variable. For example, you can use the Goal Seek to find the break-even value for sales (the break-even is the amount of sales whose marginal revenue just covers the fixed costs and the profit is thus zero).
First, select the ``Goal Seek...'' tool item from ``Tools'' menu. Specify the output variable cell (``Set Cell'') by typing the cell reference into the entry or by clicking the worksheet cell. If you are searching for the break-even point, for example, you should specify the cell reference of the profit calculation here.
Specify the desired result for the output variable cell into the ``To Value'' cell. In the search for the break-even, specify this to be zero.
Specify the input variable cell (``By changing cell'') by typing the cell reference into the entry or by clicking the worksheet cell. In the search for the break-even, specify the cell reference of the sales here. When you have done this, you may want to press the ``Apply'' button to start the tool.
Gnumeric will systematically iterate the model by changing the input value to achieve the desired result, if possible. If goal seek was successful the tool displays the message ``Goal Seeking with cell __ found a solution''.
It is possible that Gnumeric does not find a solution that generates the desired result. There may not be such a solution for the model, or, it may be too difficult to find. For example, the mathematical function behind the calculation may have many non-continuous points.
Previous Analysis using Complex Numbers | Contents | Next Solver |
Previous | Next |
With Gnumeric Solver you can solve linear programs.
A linear program (LP) is a problem that can be expressed as linear functions. As you probably already know, a linear function is the one whose graph is always a straight line. Thus each variable of it appears in a separate term with its coefficient. There must be no products or quotients of these variables. In addition, the exponent of each term must be one. No logarithmic, exponential, trigonometric terms are allowed. Especially note that functions like ABS, IF, MAX, and MIN are not linear. Here are a few examples of linear functions:
3x + y - 5z -3.23x + 0.33y -0.3x + 4y - 2z + 1.2m
The linear problem has a so called objective function which is to be minimized or maximized and constraints. The objective function is the one whose value we would like to optimize. Typically, this function could determine the profit generated by the expected sales of the given model (maximization problem), or, the cost of the production in the given environment (minimization problem). Anyway, on purely mathematical point of view, we could examine the following objective function:
Maximize 2x + 3y - z
In linear programming the variables of this functions are not allowed to take any values (otherwise the maximum of any objective function would be infinity). The problem also has constraints. The constraints are a set of linear functions and a set of their right hand side values (RHS). For example, for the previously defined objective function we have the following constraints:
x + y <= 5 (#1) 3x - y + z <= 9 (#2) x + y >= 1 (#3) x + y + z = 4 (#4) x, y, z >= 0 (non-negativity assumption)
This constraint set consists of three inequality constraints (#1-#3) and one equality constraint (#4). Their RHS values are 5, 9, 1, and 4. In addition, we also have the non-negativity assumption. That is, all the variables (x, y, and z) have to take only positive numbers. The idea is to find the optimal values for the variables (x, y, and z) but also to satisfy all the given constraints.
To solve optimization problems with Gnumeric you have to type in the problem into a sheet. A recommended way to start with is to allocate a separate column in the spreadsheet for each decision variable (in the previous example the x, y, and z) and a separate row for each constraint (the constraints #1-#4). The coefficients of these variables should be placed into the cells corresponding to the allocated row and the column. It is also recommended that you label the rows and the columns to make the sheet much more readable. The sheet for our maximization problem would look like this:
As you can see, we have put the model variables into cells B3:D3. They are currently all zeros. The cell E4 contains the objective function definition. The easiest way to define it is to use SUMPRODUCT build-in function. Thus in our model, we have the formula `=SUMPRODUCT(B3:D3,B4:D4)' in E3.
The constraints are defined in rows seven to ten. Since the coefficients of these functions are in columns B, C and D we will get the total sum of each of the constraint using the formula `SUMPRODUCT(B$3:D$3,Bn:Dn)' where n is the row number of the constraint. For example, in E7 we have `=SUMPRODUCT(B$3:D$3,B7:D7)', in E8 `=SUMPRODUCT(B$3:D$3,B8:D8)' and so on. The right hand side (RHS) values of the constraints are typed into cells G7:G10.
Now it is time to select `Solver...' from the `Tools' menu. After you have done it, the following dialog will appear:
Since we have the objective function in E3 type this into the `Set Target Cell:' entry. We are about to maximize this function, thus the radio button `Max' should be pressed on. By default, the problem is assumed to be maximization problem. The input variables (x, y, and z) were in cells B3:D3 so type the cell range into the `By Changing Cells:' entry.
The model to be optimized is a linear model. Thus, we should check that the check button `Linear (LP/MILP)' is pressed on under the `Model Assumptions'. Also make sure that the assume non-negative button is on, otherwise, the input variables can also take negative values. There is also a check button `Assume Integer (Discrete)' which adds an integer constraint for all the input variables. The integer optimization is described, however, later.
A few additional options can be set too. If you want to limit the number of iterations the optimization algorithm is allowed to take you can set the maximum number in the `Max iterations' entry box. Similarly, you can limit the maximum time the optimization is allowed to take in the `Max time' entry box. If either one of these settings is exceeded during the optimization, the optimization is interrupted and an error dialog is displayed.
Some models can be better solved if the model is scaled into another form before the actual optimization. Gnumeric solver supports automatic scaling which can be checked on by using the check button on the bottom of the dialog. Note that the automatic scaling does not change the model since before checking out the results the model is scaled back to its original form.
Now we can add the constraints. Select the `Constraints' page from the top of the dialog and the following page should appear.
In this page, you can see all constraints that have been defined in the `Subject to the Constraints:' window. Since none has been defined, this window should be empty. Now type in the constraints (#1-#4) one by one.
When adding constraints, the three entry boxes in the bottom of the dialog are used. Put a cell name of the total left hand side (LHS) cell into the `Left Hand Side:' entry box. In our example, this would be E7 for the constraint #1, E8 for constraint #2, and so on. The combo entry in the middle defines the type of the constraint. It can be `<=', `=', `>=' , or `Int'. We will explain the `Int' constraints later. In this example, you should select `<=' for constraints #1-#2, `>=' for #3, and `=' for constraint #4. The last entry on the right takes the right hand side values of the constraints. For constraints #1-#4 they should be G7 (5), G8 (9), G9 (1), and G10 (4) in this order.
After typing a constraint press
button, and you will be able to define the next one. When you have typed in all the constraints, the Solver dialog should look like this:The order of the constraints does not matter. If you want to change or delete a constraint click it and then press `Change' or `Delete' button.
Note that you can also type ranges into the LHS and RHS entries. For example, you could have typed D7:D8 and G7:G8 instead of the two separate constraints.
If the constraints have now been typed in correctly, we should check what reports we want to produce.
Select the `Reports' page from the top of the dialog and the a page containing five check buttons should appear. By pressing these check buttons on, you can produce various kinds of reports. You can read more about solver reporting in the following section.
After you have specified the parameters, the constraints and the reporting options it is time to press the `OK' button. If everything went ok, you will see a dialog saying: `Solver found an optimal solution. All constraints and optimality conditions are satisfied.'. This means that the solver found an optimal solution and the optimal values are now stored into the input variables. For all models, this, however, does not happen.
If a feasible solution cannot be found, the solver reports that `A feasible solution could not be found. All specified constraints cannot be met simultaneously.'.
If the model is unbounded, the solver reports that `The Target Cell value specified does not converge! The program is unbounded.'.
If the maximum number of iterations specified in the options was exceeded, the solver reports that `The maximum number of iterations exceeded. The optimal value could not be found.'.
If the maximum time specified in the options was exceeded, the solver reports that `The maximum time exceeded. The optimal value could not be found in given time.'.
Answer report gives the original and final values for the problem and for all the input variables and the constraints. In addition, for the constraints their formulas, binding status and the slacks are printed out nicely. The answer report is given as a new sheet.
Sensitivity report gives the shadow prices for the constraints.
Note that if the model contains integer or boolean constraints, sensitivity report cannot be produced.
Limits report reports the achieved optimal value all the input variables of the model with the optimal values and with upper and lower bound for the optimal value in with the particular variable could vary without changing the optimal solution.
If an optimal value for a variable x is 4, for example, and the lower bound is 2.4 and upper bound 5.9, then x could take any value between 2.4 and 5.9, and still all the same constraints were binding as with the optimal value 4. In limits report, you can also find the value of the target cell for both upper and lower bound values for the variable. For example, if the optimal value where x is 4 leads to a profit of $5,000, limits report specifies that if x is set to 2.4 the profit drops to $3,640.
Note that if the model contains integer or boolean constraints, limits report cannot be produced.
Performance reports gives various statistical characteristics about the given model like how many variables and rows it contains, and how many non-zero matrix elements it has. It also gives out the performance numbers like how much computing time was required to compute the results.
Previous Goal Seek Tool | Contents | Next Simulation Analysis |
Previous | Next |
Previous Solver | Contents | Next Analysis using scenarios |
Previous | Next |
Previous Simulation Analysis | Contents | Next Statistical Analysis |
Previous | Next |
The data analysis tools package contains tools for statistical data analysis and data sampling. To use these tools select the Data Analysis... item in the Tools menu. This yields a list of tools to choose from. Select one of the tools from the list and press the OK button or double-click on the tool. The tools are described below.
All tools have the same output options (see Figure 6.6, “Common output options of the data analysis tools”). The results can be printed into a new sheet, into a new workbook, or into a given output range on a sheet of the current workbook. To select the output method select one of the radio buttons inside the Output frame. If you have chosen “Output Range” you must also enter a single range in the entry field.
Select the Autofit Columns option to automatically adjust the widths of the columns in the output range.
![]() | Note |
---|---|
If the chosen output range is too small, some of the results will be lost. |
![]() | Note |
---|---|
The old data in the output range is deleted and cannot be recovered. |
To enter a range into an entry field, you can either type the range specification into the text field, or click in the text field and then select the range on the sheet (see Figure 6.7, “Specifying Ranges”).
Some entry fields accept lists of ranges. To enter these lists, select one range, type a comma, and then select the next range. At any time, you may switch to another sheet of the workbook.
Use this tool to perform a single factor analysis of the variances of given variables. The variables are specified by the “Input Range:” entry. The given range can be grouped into the variables either by columns, by rows or by areas. The “Alpha:” entry specifies the significance level which is by default 5%.
If the first row or first column of the given range, or the first field of each area contains labels, select the “Labels ” option. The names of the variables will be included in the output table.
The results of this analysis of variance are presented in a standard ANOVA table. The “F critical” value is the largest value of F that is statistically significant using the given significance level (“Alpha”).
This tool also calculates the count, sum, average, and the variance of each variable.
Example 6.1. Using the single factor ANOVA
See Figure 6.8, “1-factor ANOVA Dialog and Example Data” for an example of a completed dialog and Figure 6.9, “Output From a 1-factor ANOVA” for the corresponding output.
Gnumeric can perform two factor fixed effects ANOVAs with and without replication. The same dialog is used and the appropriate tool is selected depending on whether the number of rows per sample is 1 or larger than 1.
If the number of rows per sample is given as 1, Gnumeric performs a two factor fixed effects ANOVA without replication. Each column of the input range is interpreted as a level of the first factor while each row is interpreted as a level of the second factor.
The first row and column of the range may contain labels for these levels. In this case the “Labels” option should be selected.
The “Alpha:” entry specifies the significance level which is by default 5%.
Example 6.2. Using the 2-factor ANOVA Without Replication Tool
See Figure 6.10, “2-factor ANOVA Without Replication Dialog” for an example of a completed dialog and Figure 6.11, “Output From a 2-factor ANOVA Without Replication” for the corresponding output.
If the number of rows per sample is larger than 1, Gnumeric performs a two factor fixed effects ANOVA with replication. Each column of the input range is interpreted as a level of the first factor while groups of rows (the number of rows in each group given by the “number of rows per sample” value) are interpreted as levels of the second factor.
The first row and column of the range may contain labels for these levels. In this case the “Labels” option should be selected.
The “Alpha:” entry specifies the significance level which is by default 5%.
See Figure 6.12, “2-factor ANOVA With Replication Dialog” for an example of a completed dialog and Figure 6.13, “Output From a 2-factor ANOVA With Replication” for the corresponding output.
Gnumeric will estimate missing values for each level combination as the mean of the existing values in that combination. The degrees of freedom are adjusted appropriately.
The correlation tool calculates the pairwise Pearson correlation coefficients of the given variables. Use this tool to calculate any number of correlation coefficients at the same time. The variables for which the correlations are calculated are specified by the “Input Range:” entry. The input range can consist of either a single range or a comma separated list of ranges. The given range or ranges can be grouped by columns, by rows, or by areas.
If the first row or column of the given ranges, or the first field of each area contains labels, the “Labels” option should be selected.
Example 6.3. Using the Correlation Tool
For example, you want to calculate the correlation between three variables, one each in columns A, B, and C. Both variables have 10 values in rows 2 to 11 with labels in row 1 (see Figure 6.15, “Some Example Data”).
Enter A1:B11 in the “Input Range:” entry by typing this directly into the entry or clicking in the entry field and then selecting that range on the sheet. In the latter case the entry will also contain the sheet name.
Select the “Columns” radio button next to “Grouped By:”, since each variable is in its own column.
Select the “Labels” option since the first row contains labels. (see Figure 6.16, “Completed Correlation Dialog”).
Specify the output options as described above.
Press the OK button.
The calculated correlations are given in a table with each column and row labeled with the names of the variables. If the names are not given in the input range, Gnumeric generates them. In our example, the correlation between the variables in column A and B, can be found in the second column and third row of the results table (see Figure 6.17, “Correlation Tool Output”).
The covariance tool calculates the pairwise covariance coefficients of the given variables. Use this tool to calculate any number of covariance coefficients at the same time. The variables for which the covariances are calculated are specified by the “Input Range:” entry. The input range can consist of either a single range or a comma separated list of ranges. The given range or ranges can be grouped by columns, by rows, or by areas.
If the first row or column of the given ranges, or the first field of each area contains labels, the “Labels” option should be selected.
Example 6.4. Using The Covariance Tool
For example, you want to calculate the covariance between three variables, one each in columns A, B, and C. Both variables have 10 values in rows 2 to 11 with labels in row 1 (see Figure 6.19, “Some Example Data”).
Enter A1:B11 in the “Input Range:” entry by typing this directly into the entry or clicking in the entry field and then selecting that range on the sheet. In the latter case the entry will also contain the sheet name.
Select the “Columns” radio button next to “Grouped By:”, since each variable is in its own column.
Select the “Labels” option since the first row contains labels.
Specify the output options as described above.
Press the OK button.
The calculated covariances are given in a table with each column and row labeled with the names of the variables. If the names are not given in the input range, Gnumeric generates them. In our example, the covariance between the variables in column A and B, can be found in the second column and third row of the results table (see Figure 6.20, “Covariance Tool Output”).
The descriptive statistics tool calculates various statistics for the given variables and a confidence interval for the population mean. The variables are specified via the “Input Range:” entry. The given range or list of ranges can be grouped into variables by columns, rows, or areas.
This tool can produce four different kinds of statistical data.
If the “Summary Statistics” option is selected, this tool calculates the mean, standard error, median, mode, standard deviation, sample variance, kurtosis, skewness, range, minimum, maximum, sum, and count for each variable.
If the “Confidence Interval for the Mean” option is selected, the tool calculates confidence intervals for the population mean of each variable. Specify the confidence level in the entry box. The default confidence level is 95%.
![]() | Note |
---|---|
The interval given will usually be wider than the interval obtained using the CONFIDENCE function. The CONFIDENCE function assumes that the population standard deviation is known. This tool estimates the population standard deviation using the sample standard deviation. |
If the “Kth Largest:” option is selected, the tool finds the kth largest value of each of the variables. Specify k in the entry box next to the option. The default is 1.
If the “Kth Smallest:” option is selected, the tool finds the kth smallest value of each of the variables. Specify k in the entry box next to the option. The default is 1.
If the first entry for each variable contains the label, select the “Labels” option.
Example 6.5. Using the Descriptive Statistics Tool
Figure 6.22, “Some Example Data” shows some example data, Figure 6.23, “The Options Page For Descriptive Statistics” the selected options, and Figure 6.24, “Descriptive Statistics Tool Output” the corresponding output.
The Exponential Smoothing tool performs the exponential smoothing for the given set or sets of values. Each value in the smoothed set is predicted based on the forecast for the prior period. The formula to calculate the forecast is: F(t+1) = F(t) + (1 - dampingFactor) * (A(t) - F(t)), where A(t) is the tth value in the original data set.
Specify the cells containing the datasets in the “Input Range” entry. The entered range or ranges are grouped into datasets either by rows or by columns.
If you have labels in the first cell of each data set, select the “Labels” option.
Specify prior forecast adjustment value in the “Damping factor” entry. A value, for example, between 0.2 and 0.3 represents 20 to 30 percent error adjustment in the prior forecast.
If you want to have the standard errors output as well, press the checkbutton on before starting the tool. The standard errors are calculated using the following formula: e(t) = SQRT ( ((A(t-3)-F(t-3))^2 + (A(t-2)-F(t-2))^2 + (A(t-1)-F(t-1))^2) / 3 ).
Example 6.6. Using the Exponential Smoothing Tool
Figure 6.26, “Some Example Data for the Exponential Smoothing Tool” shows some example data and Figure 6.27, “Exponential Smoothing Tool Output” the corresponding output.
The Fourier Analysis tool normally performs a Fast Fourier Transform to obtain the discrete fourier transform Fs of the given sequence ft of real numbers according to the formula given in Figure 6.29, “Fourier Analysis Formulae”.
Select the “Inverse” option to calculate the inverse discrete fourier transform ft of the given sequence Fs of real numbers
![]() | Note |
---|---|
If the given sequences does not contain a number of terms that is a power of 2 (i.e. 2, 4, 8, 16, 32, 64, 128, etc.), this tool will append zeros to reach such a power of 2! |
Specify the cells containing the datasets in the “Input Range” entry. The entered range or ranges are grouped into sequences either by rows or by columns.
If you have labels in the first cell of each data set, select the “Labels” option.
![]() | Note |
---|---|
Before using the numbers obtained by this tool, ensure that these are in fact the correct formulae for your discipline. In the physical sciences this fourier transform tends to be called the inverse fourier transform and vice versa. Moreover, frequently the scaling factor varies. For example Mathematica uses the terms fourier transform and inverse fourier transform with the reversed meaning than Gnumeric and it uses a scaling factor of 1/SQRT(N) rather than 1/N. |
Use the F-Test tool to test whether two population variances are different against the null hypothesis that they are not.
Specify the variables in the “Variable 1 Range:” and “Variable 2 Range:” entries. The “Alpha:” entry contains the significance level which is by default 5%.
If the first field of each range contains labels, select the “Labels” option. The names of the variables will be included in the output table.
The results are given in a table. This table contains the mean, variance, count of observations and the degree of freedom for both variables. The output table also includes the F-value, the one-tailed probability for the F-value, and the F Critical value for one-tailed test and the corresponding values for a two tailed test. The one-tailed probability for the F-value (“P(F<=f) one-tail” row) is the probability of making a Type I error in the one-tailed test. Similarly, the two-tailed probability for the F-value (“P two-tail” row) is the probability of making a Type I error in the two-tailed test. Since in the two-tailed F-Test both critical values are positive, the “F Critical two-tail” row contains two numbers.
If the output is directed into a specific output range, that range should contain at least three columns and eight rows.
Example 6.7. Using the F-Test Tool
Figure 6.31, “Some Example Data” shows some example data and Figure 6.32, “F-Test Tool Output” the corresponding output.
The histogram calculates several kinds of histograms for one or more variables. The types of histogram created are determined by the options selected.
As shown in Figure 6.33, “Histogram Tool Dialog”, the histogram dialog has four tabs. We will introduce them in sequence.
The “Input” tab contains the field specifying the data to be used for the histogram.
The “Input Range” entry contains a single range or a list of ranges, that can be grouped into variables by rows, columns, or areas. The “Bin Range” entry contains a single range of cutoff values. Both ranges may also include labels.
If the first row or column of the given input ranges, or the first field of each area contains labels, the “Input Labels” option should be selected.
The bins (or classes) for the histogram can either be predetermined by data contained in your workbook or calculated by the histogram tool.
Select the “Predetermined Bins” option to specify data on your worksheet in the “Bin Range:” entry. The range should consist of a sigle column or two columns (the first one containing labels). If the first column of the bin range contains labels, select the “Bin Labels” option. The values in the last column are used as seprators between adjacent bins.
Select the “Calculated Bins” option to have the bins determined by the tool. Enter the desired number of bins in the “N:” entry. It is recommended (but optional) that you specify the minimum and maximum cutoffs in the “Min:” and “Max:” entries.
The options in the options tab modify the appearance of the histogram:
The “Pareto” option causes the bins to be sorted by decreasing frequency of the first variable.
The “Percentages” option adds a histogram in terms of percentages rather than frequencies.
The “Cumulative Percentages” option adds a cumulative histogram.
The “Chart” option is not implemented.
The Output tab contains the standard output options and fields described at the begining of the section called “Statistical Analysis”.
Example 6.8. Using the Histogram Tool
For example, you want to calculate a histogram and a cumulative histogram in percentages for a the number of successes in several sequences of trials. The numbers of successes are recorded in column A and the classes of interest in column D with labels in column C (see Figure 6.35, “Some Example Data”).
Enter A1:A21 in the “Input Range:” entry of the “Input” tab by typing this directly into the entry or clicking in the entry field and then selecting that range on the sheet. In the latter case the entry will also contain the sheet name.
Since you only have one variable select the “Areas” or “Columns” radio button next to “Grouped By:”.
Select the “Input Labels” option since the first cell of the Input Range contains a label.
Enter C1:D5 in the “Bin Range:” entry of the “Bins” tab. The “Predetermined Bins” option will now also be selected (see Figure 6.36, “Specifying Bins”).
Select the “Bin Labels” option since the first column of the Bin Range contains labels.
Select the “Percentage” and “Cumulative Percentages” options of the “Options” tab.
In the “Output” tab, specify the output options as described at the begining of the section called “Statistical Analysis”.
Press the OK button.
The results are shown in Figure 6.37, “Histogram Tool Output”.
Use the moving average tool to calculate moving averages of one or more data sets. A moving average provides useful trend information of the data that is lost in a simple average. In addition, moving averages can be used to eliminate random variance. For example, use this tool to create a smoother curve of a stock prize.
Specify the cells containing the datasets in the “Input Range” entry. The entered range or ranges are grouped into datasets either by rows or by columns.
If you have labels in the first cell of each data set, select the “Labels” option.
Specify the “Interval” for the moving average. The interval i is the number of consecutive values to be included in each moving average.
The results are given in one column for each dataset Each row represents the moving average of the corresponding row or column in the input range. The moving average cannot be calculated for the first k rows in the input range where k is smaller than the given interval i.
Example 6.9. Using the Moving Average Tool
Figure 6.39, “Some Example Data for the Moving Average Tool” shows some example data and Figure 6.40, “Moving Averages Tool Output” the corresponding output.
Use this tool to rank given data and to calculate the percentiles of each data point.
Specify the datasets to use in the “Input Range:” entry. The given range can be grouped into datasets by columns, by rows, or by areas.
For each dataset, the tool creates three columns in the output table:
The first column gives the indices of the ordered data from largest to smallest data value.
The second column gives data values corresponding to the indices in the first column.
The third column indicates the percentile of the data value in the second column.
If you have labels in the first cell of each data set, select the “Labels” option.
Example 6.10. Using the Rank and Percentile Tool
Figure 6.42, “Some Example Data for the Rank and Percentile Tool” shows some example data and Figure 6.43, “Rank and Percentile Tool Output” the corresponding output.
![]() | Note |
---|---|
In the case of ties, the rank calculated by this tool differs from the value of the RANK function for the same data. This tool calculates the rank as it is normally used in Statistics: If two values are tied, the assigned rank is the average rank for those entries. For example in Figure 6.42, “Some Example Data for the Rank and Percentile Tool” the two values 10 are the second and third largest values. Since they are equal each receives the rank of 2.5, the average of 2 and 3. The rank function on the other hand assigns the rank as it is normally used to determine placements. The two values 10 would therefore each receive a rank of 2. |
The regression tool performs a multiple regression analysis.
Enter a range or list of ranges containing the independent variables into the “X Variables:” entry. These ranges can be grouped into the various independent variables by columns, by rows, or by areas. Select the appropriate option.
Enter a single range containing the dependent variable into the “Y Variable:” entry.
If the ranges for the independent and dependent variables also contains labels in the first field of each row, column or area, select the “ Labels” option.
Specify the confidence level in the “Confidence Level:” entry. The default is 95%.
To force the regression line or plane to pass through the origin, select the “Force Intercept To Be Zero” option.
Specify the output options as described above. If the output is directed into a specific output range, that range should contain at least seven columns and 17 rows more than there are independent variables.
Example 6.11. Using the Regression Tool
Suppose you want to perform a regression analysis on the data given in Figure 6.45, “Regression Example Data” using v and y as independent variables and u as dependent variable.
Enter B1:B9,E1:E9 in the “X Variables:” entry by typing this directly into the entry or clicking in the entry field and then selecting the first part range on the sheet, typing comma, and then selecting the second range. In the latter case the entry will also contain the sheet name.
Enter A1:A9 in the “Y Variable:” entry.
Select the “Columns” or “Areas” option since each variable is in its own column and also its own area.
Select the “Labels” option since the first row contains labels. (see Figure 6.46, “Completed Regression Dialog”).
Specify the output options as described above.
Press the OK button.
The output of this regression analysis is shown in Figure 6.47, “Regression Tool Output”.
Use the sampling tool to take a sample of a data set. This tool can take both a random sample of a given size or a periodic sample:
A random sample is a subset of the population such that every subset of that size has the same chance of being picked.
In a periodic sample every kth element in the population is selected.
To use this tool, first specify the data set or data sets by setting the “Input Range:” entry. The range or ranges given can be grouped into datasets by rows, by columns, or by areas.
If the first entry in each data set contains a variable, select the “Labels” option.
Select the sampling method which can be either periodic or random.
Specify the size of the random sample in the “Size of Sample:” entry.
Specify the period in the “Period:” entry.
Specify the number of samples you would like to obtain in the “ Number of Samples:” entry.
![]() | Note |
---|---|
Since the period uniquely determines a periodic sample, if you specify that you would like 2 samples you will be given the identical sample twice. |
![]() | Note |
---|---|
If the dataset for a periodic sample is a two dimensional range, Gnumeric will enumerate the data points by row first. |
Example 6.12. Using the Sampling Tool
Figure 6.49, “Some Example Data for the Sampling Tool” shows some example data and Figure 6.50, “Sampling Tool Output” the corresponding output.
Gnumeric provides 4 similar tools to test whether the difference of two population means is equal to a hypothesized value. These four tools use the same dialog (see Figure 6.51, “t- and z-Test Tool Dialog”).
Depending on the options settings, the appropriate test will be performed. The entries in the “Input”, “Test”, and “Output” frames are independent from the specific test.
Enter the first variable in the “Variable 1 Range” entry and the second variable in the “Variable 2 Range” entry.
Enter the hypothesized difference between the population means in the “Hypothesized Mean Difference” entry, which has a default of 0. Enter the significance level in the “Alpha” entry, which has a default of 5 %.
Specify the output options as described above. If the output is printed into a range, it should have at least three columns and ten rows.
There are up to three possible options that can be selected:
If the variables are dependent (or paired) select the “Paired” option.
For unpaired or independent variables, the population variances may be known or unknown. In the latter case they will be estimated using the sample variances. Select the “Known” option if you in fact know the population variances prior to collecting the sample.
For paired variables with unknown population variances, we may either assume that the population variances are equal or not. If the population variances are assumed to be equal, Gnumeric will estimate the common variance by pooling the sample variances. Select the “Equal” option to assume that the population variances are equal.
For paired variables, when you click on “OK”, Gnumeric will test whether the mean of the difference between the paired variables is equal to the given hypothesized mean difference.
Example 6.13. Using the t-Test (Paired) Tool
See Figure 6.53, “t-Test (Paired) Example Data” for an example of a completed dialog and Figure 6.54, “Output from the t-Test (Paired) Tool” for the corresponding output.
For unpaired variables with unknown but assumed equal population variances, when you click on “OK”, Gnumeric will test whether the mean of the difference between the paired variables is equal to the given hypothesized mean difference.
Example 6.14. Using the t-Test (Unknown but Equal Variances) Tool
See Figure 6.56, “t-Test (Unknown but Equal Variances) Example Data” for an example of a completed dialog and Figure 6.57, “Output from the t-Test (Unknown but Equal Variances) Tool” for the corresponding output.
For unpaired variables with unknown and assumed unequal population variances, when you click on “OK”, Gnumeric will test whether the mean of the difference between the paired variables is equal to the given hypothesized mean difference.
Example 6.15. Using the t-Test (Unknown and Unequal Variances) Tool
See Figure 6.59, “t-Test (Unknown and Unequal Variances) Example Data” for an example of a completed dialog and Figure 6.60, “Output from the t-Test (Unknown and Unequal Variances) Tool” for the corresponding output.
For unpaired variables with known population variances, enter those variances in the “Variable 1 Pop. Variance” and “Variable 2 Pop. Variance” entries. When you click on “OK”, Gnumeric will test whether the mean of the difference between the paired variables is equal to the given hypothesized mean difference.
Example 6.16. Using the z-Test Tool
See Figure 6.62, “z-Test Example Data” for an example of a completed dialog and Figure 6.63, “Output from the z-Test Tool” for the corresponding output.
Previous Analysis using scenarios | Contents | Next Graphics: Plots, Images and Drawings |
Previous | Next |
This chapter explains how to use Gnumeric to add graphical elements to a worksheet. Data plots allow users to create charts of data in a worksheet including pie charts, bar and column charts and scatterplots. Images in standard computer formats can be added on top of a worksheet. Drawings allow users to add simple graphical elements on top of a worksheet including lines, arrows and simple polygons.
Previous Statistical Analysis | Contents | Next Adding Graphical Elements to a Worksheet |
Previous | Next |
Previous Graphics: Plots, Images and Drawings | Contents | Next Adding Data Plots to a Worksheet |
Previous | Next |
Gnumeric can create graphical plots of the data contained in a worksheet. Gnumeric can make the following graph types:
Bar Charts
Column Charts
Line Graphs
Pie Charts
Scatter Plots
Bubble Plots
Creating a basic graph is a relativly straight forward process.
Enter data into your spreadsheet.
Select the data you wish to include in the graph. This includes labels for rows and columns.
Click the Graph button. This is the button on the standard toolbar which has three columns of different colours, just to the left of the zomm box.
Select the type of graph you wish to use.
Click Finish to use the default settings.
Press and hold on the spreadsheet to start to draw your graph. A box will form. Drag the box to the size you wish the graph to be and let go. The graph will be drawn.
In no way does graphing in Gnumeric stop with a simple graph. In the graphs you make, you can customize it. For example, you can say which cells define the ranges or labels. If a label for a field is in paraenthesis, it means that field is optional.
In the second step of the graphing assistant, you'll find you can customize the ranges which are taken into account for drawing the graph.
At the top of the window is a preview of the graph. Below that are your settings. When you change a setting, the sample graph will change automatically to reflect your customizations.
A graph is made up of plots. Currently, Gnumeric can only generate one graph from a spreadsheet. However, you can import an Excel spreadsheet to use multiple plots. You can customize the data ranges of each plot.
A the section called “Plot” is made up of a group of series. A series is each item that is to be graphed.
Example 7.1. Series Example
A small Boston based software company is doing a spreadsheet for their montly income and spendings. The month goes on the x-axis while the dollars spent a month goes on the y-axis. Two bars are drawn for each month: in and out. In and out are the two series.
You can customize the ranges for every series included in your graph.
The Name field defines what the name of each series is. This is reflected in the legend. Per the Example 7.1, “Series Example”, the name for the first series would be in.
The Name field takes a simple reference. The reference field needs what sheet and cell the information is stored on. For more information on references, please consult the section called “Cell Referencing”.
Example 7.2. Name Example
A name needs to be derived from Sheet1 and cell B1. The name field would include:
Sheet1!$B$1
The Values field defines which data should be included in the graph. The Values field takes two arguements. The reference requires the sheet name and cell range the information is located on. For more information on references, please consult the section called “Cell Referencing”.
Example 7.3. Values Example
A series needs to have information graphed from Sheet1, using cells B2 through B13. The following would be inserted into Values:
Sheet1!$B$2:$B$13
The Category Labels field sets what cells are used to derive the labels on the x-axis. The Category Labels takes a simple reference. The reference needs the sheet name and cell ranges that the information is on. For more information on references, please consult the section called “Cell Referencing”.
Example 7.4. Category Labels Example
A graph needs to be generated that uses labels defined on Sheet1, using cells A2 or A13. The following would be inserted into Category Labels:
Sheet1$A$2:$A$13
Previous Adding Graphical Elements to a Worksheet | Contents | Next Adding Images to a Worksheet |
Previous | Next |
Previous Adding Data Plots to a Worksheet | Contents | Next Adding Drawing and Graphical Interface Elements to a Worksheet |
Previous | Next |
A Gnumeric worksheet can contain graphical elements above the sheet grid layer both to allow simple drawings and to allow the inclusion of a limited number of user interface elements.
All of these elements are added using the toolbar which contains icons for the elements. This toolbar may not be visible in which case it will have to be made visible using the View menu and selecting the Toolbars menu item (see the section called “Configuring Gnumeric Toolbars” for a detailed explanation. The basic process to add any of these elements is to click with the left hand mouse button on the toolbar icon representing the element to be added and then to click on the sheet grid. The element will then appear on the worksheet and can be moved and resized like all of the graphical elements in Gnumeric. The next sections explain in turn how to use each these elements.
Previous Adding Images to a Worksheet | Contents | Next Managing and Viewing Worksheets |
Previous | Next |
This chapter explains how to manage worksheets and manipulate the view of the worksheet contents.
Previous Adding Drawing and Graphical Interface Elements to a Worksheet | Contents | Next An Overview of Worksheets and Views |
Previous | Next |
Each workbook (or file) can contain multiple worksheets which hold both the cell grid and graphical objects such as charts and drawing elements. The collection of worksheets can be manipulated allowing the addition, duplication, deletion and re-ordering of worksheets within a workbook. Gnumeric includes several techniques to work simultaneously with several different views of the same workbook, to fix parts of a worksheet and scroll others or to group data within a worksheet for convinient editing and analysis.
This chapter has not yet been written.
Previous Managing and Viewing Worksheets | Contents | Next Manipulating Whole Columns and Rows |
Previous | Next |
Previous An Overview of Worksheets and Views | Contents | Next Managing Worksheets |
Previous | Next |
Previous Manipulating Whole Columns and Rows | Contents | Next Viewing Worksheet Contents |
Previous | Next |
This section has not yet been written.
This section has not yet been written.
Previous Managing Worksheets | Contents | Next Workbook Settings |
Previous | Next |
This chapter explains the contents of a Gnumeric workbook which are not part of the worksheets. This includes several settings which apply to the workbook and are saved in the Gnumeric file. Settings which apply to the Gnumeric program itself are called `preferences' and are explained in Chapter 10, Configuring Gnumeric.
Previous Viewing Worksheet Contents | Contents | Next Overview of the File Contents and Settings |
Previous | Next |
The contents of a Gnumeric file describe all of the elements which can be changed by the user. This sections examines all of the workbook contents which are not part of the worksheets.
This chapter has not yet been written.
Previous Workbook Settings | Contents | Next Document Summary |
Previous | Next |
A small amount of metadata is associated with each document. These metadata describe the author of the document and other related information.
Previous Overview of the File Contents and Settings | Contents | Next Document Settings |
Previous | Next |
Previous Document Summary | Contents | Next Document Named Elements |
Previous | Next |
Previous Document Settings | Contents | Next Configuring Gnumeric |
Previous | Next |
This chapter explains how to change the default behaviour of Gnumeric including the startup behaviour and default locale (language and number display).
Previous Document Named Elements | Contents | Next Configuring Gnumeric |
Previous | Next |
Previous Configuring Gnumeric | Contents | Next Configuring Gnumeric Toolbars |
Previous | Next |
Previous Configuring Gnumeric | Contents | Next Configuring Gnumeric Preferences |
Previous | Next |
The Preferences Dialog allows to configure various aspects of Gnumeric.
![]() | TIP |
---|---|
When your cursor hovers over an entry field or checkbox, a tooltip may appear outlining the effect of the option. |
The Preferences Dialog has several pages. Each page addresses a certain aspects of using Gnumeric.
The General Font Tab sets the default font name, size and style to be used in the cells on every sheet.
The Header & Footer Font Tab sets the default font name, size and style for the headers and footers of each page when printed. THe content of the headers and footers is determined via the Page Setup dialog, detailed in the section called “Page Setup.”
The Windows Tab includes various settings related to new workbooks, such as the window size and the number of intial sheets.
The Files Tab provides settings related to the handling of files.
![]() | TIP |
---|---|
If you are usually using one of a small number of documents, you should set the Length of File History to be slightly larger than the number of these documents. |
The Undo Tab permits to customize the undo feature. You would normally like the number of undo items to be in the 10 to 25 range and the maximal undo size to be 10000 to 100000, unless you only have little memory available.
The Sorting Tab allows to determine the default settings for the Sort Dialog. See the ???
The Various Tab includes a variety of options that did not fit within any of the other tabs.
The Various (Internal) Tab includes a variety of options that customize the internal working of Gnumeric.
![]() | WARNING |
---|---|
Do not change any of the settings in the Various (Internal) Tab without serious consideration. |
Previous Configuring Gnumeric Toolbars | Contents | Next Configuring Gnumeric Plugins |
Previous | Next |
Previous Configuring Gnumeric Preferences | Contents | Next Configuring the Language and Local Settings of Gnumeric |
Previous | Next |
Previous Configuring Gnumeric Plugins | Contents | Next File Opening and Saving |
Previous | Next |
This chapter explains how to use files in Gnumeric including how to save the current file, how to change the file format of saved files and how to open files from a different format.
Previous Configuring the Language and Local Settings of Gnumeric | Contents | Next Working with Files |
Previous | Next |
Previous File Opening and Saving | Contents | Next Opening and Importing Files |
Previous | Next |
There are several ways to open an existing file to be used in Gnumeric. Usually, a given file can be opened in Gnumeric if Gnumeric also allows the file to be saved in the same format. Other file formats may be imported into Gnumeric (see the section called “File Formats” for a list of supported formats).
The Open File Dialog can be invoked several ways. It is available in the Menubar from the File/ Open.. menuitem (see the section called “The File Menu”). There is also a toolbar Open (see the section called “The Standard Toolbar”). All these methods are equivalent.
Opening a file
File/ Open..
Open
F3
The Import File Dialog can be invoked in the Menubar from the File/ Import.. menuitem (see the section called “The File Menu”).
Importing a file
File/ Save as...
In the Save as.. dialog you can choose between various file formats. (see Figure 11.1, “File Format Selector”)
Similarly, in the Import.. dialog you can also choose between various file formats. (see Figure 11.2, “File Format Selector”)
Most of these formats are provided by plug-ins. If they don't appear on your list of available plug-ins use the Tools Plug-ins... menu item to verify that the appropriate plug-in has been loaded.
The default file format and Gnumeric's native format is an xml based file. The file format is a ascii text based xml format. It is however, typically written and read in a gzip compressed form.
The uncompressed format is human readable and designed to be easily parsed. It is very extensible.
This format is supported by the “Data Interchange Format (DIF) module” plug-in.
![]() | Note |
---|---|
This format is available when saving or importing files. |
This format is supported by the “HTML & TeX” plug-in.
![]() | Note |
---|---|
This format is only available when saving files. |
Creation of a dvi file with Gnumeric requires that groff has been installed. If a complete TeX installation is available it is probably advisable to use the LaTeX format (the section called “LaTeX 2e Format”) instead, since the created LaTeX file can be extensively customized before creating the dvi file from it.
Example 11.1. Saving as DVI TeX
The screenshot Figure 11.3, “Gnumeric Sample Screenshot” shows an example Gnumeric file. If we save this file in DVI TeX format and open it using xdvi we obtain Figure 11.4, “xdvi Screenshot of DVI TeX File”.
This format is supported by the “MS Excel (tm) File Formats” plug-in.
Gnumeric can open files from most recent versions of MS Excel (tm). It can also save files in MS Excel (tm) 95 format.
This format is supported by the “EXPERIMENTAL SAX based XML” plug-in.
![]() | Note |
---|---|
This format is available when importing or saving files. |
This format is supported by the “Gnome Glossary” plug-in.
![]() | Note |
---|---|
This format is only available when saving files. |
These formats are supported by the “HTML & TeX” plug-in.
![]() | Note |
---|---|
This format is only available when importing or opening files. |
Very simple and well structured HTML tables can be opened by Gnumeric into an appropriate spreadsheet. In this process, Gnumeric will lose information on merged cells and most other formatting, but the main cell values should be preserved.
![]() | Note |
---|---|
This format is only available when saving files. |
Gnumeric can create HTML 3.2 files. All sheets of the current workbook are exported. The tables in the HTML 3.2 file contain all cells, whether visible or not, including merged cells and spans. Horizontal as well as vertical alignment is preserved, as are font colors and some font characteristics (italic, bold). These files also include an appropriate preamble.
Example 11.2. Saving as HTML 3.2
The screenshot Figure 11.3, “Gnumeric Sample Screenshot” shows an example Gnumeric file. If we save this file in HTML 3.2 format and open it using Mozilla 0.95 we obtain Figure 11.5, “Mozilla Screenshot of HTML 3.2 File”.
![]() | Note |
---|---|
This format is only available when saving files. |
Gnumeric can create HTML 4.0 files. All sheets of the current workbook are exported. The tables in the HTML 4.0 file contain all cells, whether visible or not, including merged cells and spans. Horizontal as well as vertical alignment is preserved, as are some font characteristics (italic, bold) and cell background colors. These files also include an appropriate preamble.
Example 11.3. Saving as HTML 4.0
The screenshot Figure 11.3, “Gnumeric Sample Screenshot” shows an example Gnumeric file. If we save this file in HTML 4.0 format and open it using Mozilla 0.95 we obtain Figure 11.6, “Mozilla Screenshot of HTML 4.0 File”.
![]() | Note |
---|---|
This format is only available when saving files. |
Gnumeric can create HTML fragments. All sheets of the current workbook are exported. The tables in such a fragment file contain all cells, whether visible or not, including merged cells and spans. Horizontal as well as vertical alignment is preserved, as are some font characteristics (italic, bold) as well as cell background and font colors. These files do not contain any preamble. Note that each tag used in these files is valid in some HTML version, the combination of these tags in a Gnumeric generated HTML fragment may not be.
Example 11.4. Saving as HTML fragment
The screenshot Figure 11.3, “Gnumeric Sample Screenshot” shows an example Gnumeric file. If we save this file as an HTML fragment and open it using Mozilla 0.95 we obtain Figure 11.7, “Mozilla Screenshot of HTML Fragment”.
This format is supported by the “HTML & TeX” plug-in.
![]() | Note |
---|---|
This format is only available when saving files. |
Only the top sheet of the current workbook is exported.
The created LaTeX file can either be input into another LaTeX file (see the section called “Including Tables Into Other Documents”) or latexed independently. See the content and the section called “Customizing The LaTeX Tables” of the created file for various customization options.
Example 11.5. Saving as LaTeX file
The screenshot Figure 11.3, “Gnumeric Sample Screenshot” shows an example Gnumeric file. If we save this file as LaTeX file, tex it using pdflatex and open it using xpdf we obtain Figure 11.8, “xpdf Screenshot of LaTeX file”.
To include an exported Gnumeric table into another LaTeX document you need to use several packages
\usepackage{color} \usepackage{array} \usepackage{longtable} \usepackage{calc} \usepackage{multirow} \usepackage{hhline} \usepackage{ifthen}
and to add the following lines to the preamble of your document:
\newlength{\gnumericTableWidth} \newlength{\gnumericTableWidthComplete}
When you have set up your main document in this way, include each table with:
\input{mygnumericfile.tex}
To switch from portrait to landscape for independently latexed tables, uncomment the line:
%,landscape%
to obtain
\documentclass[12pt% ,landscape% ]{report}
To change the column widths, look for the following section in the LaTeX file:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% %% The following are the widths of the various columns. We are %% %% defining them here because then they are easier to change. %% %% Depending on the cell formats we may use them more than once. %% %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def\gnumericColA{107pt*\gnumericScale} \def\gnumericColB{89pt*\gnumericScale} \def\gnumericColC{98pt*\gnumericScale} \def\gnumericColD{89pt*\gnumericScale} \def\gnumericColE{89pt*\gnumericScale}
To change the second column (Column B) to a width of 0.75 inches, we would simply have to modify this code to:
\def\gnumericColA{107pt*\gnumericScale} \def\gnumericColB{0.75in} \def\gnumericColC{98pt*\gnumericScale} \def\gnumericColD{89pt*\gnumericScale} \def\gnumericColE{89pt*\gnumericScale}
This format is supported by the “Linear and integer expression (MPS) format module” plug-in.
![]() | Note |
---|---|
This format is only available when importing files. |
This format is supported by the “Plan Perfect” plug-in.
![]() | Note |
---|---|
This format is only available when importing files. |
Currently, Gnumeric cannot save directly as a PDF file; but, provided a standard tetex installation is available, the Gnumeric file can be saved as a LaTeX file (see the section called “LaTeX 2e Format”), and turned into a PDF file using pdflatex.
See Figure 11.8, “xpdf Screenshot of LaTeX file” for an example of a created PDF file.
This format is supported by the “SC/XSpread Format” plug-in.
![]() | Note |
---|---|
This format is only available when importing files. |
This format exports Gnumeric spreadsheets as straight text or imports them from straight text files. Both export (save as) as well as import can be highly customized.
After specifying the “Text File Export” Format and a file name in the “Save as..” dialog, the text export druid starts to guide you through the various options:
Specify which sheets to export.
Choose the line terminator to use. You should select it based on the platform you want the created file to be used on. Choose one of several field separators and whether to quote all fields or only as needed. The defaults create the standard Unix csv format.
Select “Finish” to finally export the selected sheets and create the text file. The standard csv output of Figure 11.3, “Gnumeric Sample Screenshot” is shown in Figure 11.11, “csv File”.
Figure 11.11. csv File
,"Operating System",,, ,DOS,Linux,SCO, January,"$1000.00 ","$900.00 ","$500.00 ", February,"$900.00 ","$2500.00 ","$300.00 ", March,"$800.00 ","$4100.00 ","$100.00 ", April,"$700.00 ","$5700.00 ",($100.00), May,"$600.00 ","$7300.00 ",($300.00), June,"$500.00 ","$8900.00 ",($500.00), July,"$400.00 ","$10500.00 ",($700.00), August,"$300.00 ","$12100.00 ",($900.00), September,"$200.00 ","$13700.00 ",($1100.00), October,"$100.00 ","$15300.00 ",($1300.00), November,"$0.00 ","$16900.00 ",($1500.00), December,($100.00),"$18500.00 ",($1700.00), ,,,, Totals:,"$5400.00 ","$116400.00 ",($7200.00), ,,,,
After specifying the “Text File Import” Format and a file name in the “Import..” dialog, the text import druid starts to guide you through the various options.
On the first screen of the druid specify the basic format type (fixed width fields or fields separated by specific characters), as well as the line numbers of the lines to import.
Select the appropriate field separator(s) in the “Separator” frame. Select the “See two separators as one”option if any sequence of separators are supposed to be considered a single separator. The “Example” frame gives immediate feedback on your choices:
Finally select the appropriate format for each input column:
After selecting a column on the left select the appropriate format on the right. In the preview section at the bottom of the dialog, you can immediately see the effect of selecting that format. The following types of formats are available:
This format will guess for each field value whether it is text, a number, a date, etc.
You can choose between various number formats. The following list presents just a short selection of those formats:
There are also formats facilitating the use of scientific notation, see Figure 11.21, “Some Scientific Formats”.
You can choose between various currency formats. The following list presents just a short selection of those formats:
You can choose between various date and time formats. Some of these formats will recognize combined date/time entries. The following list presents just a short selection of those formats:
You can choose between various formats that recognize percentages. The following list presents just a short selection of those formats:
You can choose between a few formats that recognize fractions. The following list presents just a short selection of those formats:
You can choose between a few formats that recognize numbers in scientific notation.. The following list presents just a short selection of those formats:
If you want the importer to simply read the field value as text without attempting to interpret it in any way, use the following text format:
More details on the various formats can be found in the section called “File Formats”.
Click the “Finish” button to complete importing the file.
If you selected fixed width fields you are asked to specify the widths for each field. Click the “Auto Column Discovery” button to have Gnumeric try to determine the fields widths automatically.
Finally select the appropriate format for each input column as in Figure 11.15, “Selecting Formats”.
Click the “Finish” button to complete importing the file.
This format is supported by the “HTML & TeX” plug-in.
![]() | Note |
---|---|
This format is only available when saving files. |
Files in this format are useful because they can be converted with the groff or troff commands into various other common formats. For example, given a TROFF file myfile.me, the command
groff -me -t -Tps myfile.me >myfile.ps
will create a postscript file of the corresponding table.
Similarly, the command
groff -me -t -Tascii myfile.me >myfile.ascii
creates an ascii (straight text) file.
Example 11.6. Creating an ASCII File
If we save Figure 11.3, “Gnumeric Sample Screenshot” as a troff file hypothetical-sales.me and then execute the command
groff -me -t -Tascii hypothetical-sales.me >hypothetical-sales.ascii
then the file hypothetical-sales.ascii contains:
Sheet 0 +----------+------------------+-------------+------------+---+ | | Operating System | | | | +----------+------------------+-------------+------------+---+ | | DOS | Linux | SCO | | +----------+------------------+-------------+------------+---+ | January | $1000.00 | $900.00 | $500.00 | | +----------+------------------+-------------+------------+---+ | February | $900.00 | $2500.00 | $300.00 | | +----------+------------------+-------------+------------+---+ | March | $800.00 | $4100.00 | $100.00 | | +----------+------------------+-------------+------------+---+ | April | $700.00 | $5700.00 | ($100.00) | | +----------+------------------+-------------+------------+---+ | May | $600.00 | $7300.00 | ($300.00) | | +----------+------------------+-------------+------------+---+ | June | $500.00 | $8900.00 | ($500.00) | | +----------+------------------+-------------+------------+---+ | July | $400.00 | $10500.00 | ($700.00) | | +----------+------------------+-------------+------------+---+ | August | $300.00 | $12100.00 | ($900.00) | | +----------+------------------+-------------+------------+---+ |September | $200.00 | $13700.00 | ($1100.00) | | +----------+------------------+-------------+------------+---+ | October | $100.00 | $15300.00 | ($1300.00) | | +----------+------------------+-------------+------------+---+ | November | $0.00 | $16900.00 | ($1500.00) | | +----------+------------------+-------------+------------+---+ | December | ($100.00) | $18500.00 | ($1700.00) | | +----------+------------------+-------------+------------+---+ | | | | | | +----------+------------------+-------------+------------+---+ | Totals: | $5400.00 | $116400.00 | ($7200.00) | | +----------+------------------+-------------+------------+---+ | | | | | | +----------+------------------+-------------+------------+---+ 1
Previous Working with Files | Contents | Next Saving Files |
Previous | Next |
There are several ways to save a file that is currently open. If the file has been named and already exists (i.e., it is not a new worksheet) the Save function will save the file to the existing name.
The Save procedure can be invoked several ways. It is available in the Menubar from the File/ Save menuitem (see the section called “The File Menu”). There is also a toolbar Save (see the section called “The Standard Toolbar”). All these methods are equivalent.
Saving a file
File/ Save
Save
Alt+f s
To save new files, or to rename a file, the Save As... is used. This will prompt the user for a new filename and path for the file to be saved as.
Saving a file as..
File/ Save as...
Save
This calls Save as... for new unnamed files.
To rename a file, the menu
or keyboard shortcut needs to be used.
Alt+f a
Previous Opening and Importing Files | Contents | Next AutoSave Tool |
Previous | Next |
The AutoSave tool can save your workbook automatically at specific intervals. You can specify how often you want your work to be saved by entering a number in the ``Minutes'' box. If you check the ``Prompt before saving'' button on, Gnumeric asks a confirmation before each automatic save.
Previous Saving Files | Contents | Next Printing |
Previous | Next |
This chapter explains how to print spreadsheets, tables and plots from Gnumeric to a printer directly or into Postscript or PDF (both are page description languages).
Previous AutoSave Tool | Contents | Next Printing to a Printer or a File. |
Previous | Next |
The Print dialog includes the most important options related to printing. More detailed options related to printing can be set in the Page Setup dialog, detailed in the section called “Page Setup.” Press the Print to print out the workbook. Press the Print Preview button to display the Print Preview dialog.
The Print dialog has 3 tabs that include different groups of options.
Normally you want to select Generic Postscript as Printer and the appropriate printer name as Location. Then click on Print to send the document to your printer.
You can also send the printed document to a postscript file by selecting File as Location and specifying an appropriate output file.
In the Job tab you may also select a multiple number of copies, or specify which sheets to print. Choose Selection to print just the range of cells currently selected on the active sheet.
In the Paper tab you can select the paper size used for printing, the page orientation and the layout. The layout specification allows to print several logical pages on the same physical sheet of paper. If you need to change your margins, scale the output to fit properly onto your page or customize the page footers or headers, see the the section called “Page Setup.”
Previous Printing | Contents | Next Page Setup. |
Previous | Next |
The Page Setup Dialog can be used to configure various options related to printing out a workbook. Click on File Menu->Page Setup to activate the Page Setup.
![]() | TIP |
---|---|
Remember that at any time you can click on the Print preview button to see what your document looks like with your selected options. See the the section called “Print Preview.” |
Normally the specified settings apply only to the current sheet. Select another sheet at the bottom of the Page Setup Dialog or select Apply to all sheets of this workbook.
Select the paper size and page orientation (portrait or landscape) to suit the best layout for your document.
Specify the required margins of the page. Nothing will be printed inside these margins, not even page numbers.
The margins will be measured in the same units (centimetres, millimetres, points or inches) as the paper size. Change the unit in the paper and layout section to best fit your needs.
Change the scale your image to fit it to your page size suitably. The scaling can both enlarge and diminish the size of your printed document.
Select the Fit to option to have the document automatically scaled. When scaling, the aspect ratio will be preserved. Therefore less pages than specified might be printed.
You may also specify whether the page is centered horizontally and/or vertically on the printable part of the page.
Select the space available for the header and footer. If you do not provide sufficient space for the header and footer, they will not print even if you chose a style for them.
Click on the option menu to choose from a range of different header and footer styles.
![]() | TIP |
---|---|
You can choose the font in which the header and footer is printed by selecting a default header/footer font the preferences (see in the section called “Configuring Gnumeric Preferences”). |
Customize the header or footer by choosing the last option on the menu.
![]() | TIP |
---|---|
Double clicking on the header or footer preview will quickly allow you to customize that header or footer. |
Enter what text you would like to appear in the header or footer. There are a number of special opcodes for common options. These are:
Name of the workbook.
Page number in the printing.
Total number of pages in the printout.
Current date in format dd-mmm-yyyy. The format can be changed by specifying the desired format in the opcode: &[DATE:yyyy/mm/dd].
Current time in format hh:mm. The format can be changed by specifying the desired format in the opcode: &[TIME:hh:mm:ss].
The basename of the file. For the file /home/jdoe/file.gnumeric, this opcode prints file.gnumeric.
The path of the file excluding the basename. For the file /home/jdoe/file.gnumeric, this opcode prints /home/jdoe/.
You can select rows or columns to be printed on every page of the output. This is commonly used for printing column or row names. To enable this, enter the range of cells to be repeated in Rows to repeat... or Columns to repeat.. field. Instead of entering them manually, you can also select columns or rows to be repeated using the mouse.
![]() | WARNING |
---|---|
Note that the rows and columns must be entered as ranges. That is, if you want to have first row repeated, you must enter 1:1, not just 1. Similarly, to have column A repeated, you must enter A:A. |
Select Grid lines to print the cell grid lines with your document. Unselect the button to hide the grid lines from your print output.
Select Black and white to convert the colours in your document to a greyscale range.
Select Styles with no content to ensure cells with style changes will be printed, even if they are empty. For example, if you have a number of cells with the background color changed but no data in them, you can select this option to ensure they are in the printed output.
Previous Printing to a Printer or a File. | Contents | Next Print Preview. |
Previous | Next |
The Print Preview Dialog is used to display what the printed output will look like. The Print Preview dialog can be used to check whether you have the desired formating and layout before you print out the workbook.
This menu contains:
First Page —Shows the first page in the workbook.
Previous Page —Shows the previous page in the workbook.
Next Page —Shows the next page in the workbook.
Last Page —Shows the last page in the workbook.
Zoom in —Zooms the current page in, showing more detail.
Zoom out —Zooms the current page out, showing less detail.
Prints the current worksheet to a file or a printer.
Show the first page in the workbook.
Show the previous page in the workbook.
Show the next page in the workbook.
Show the last page in the workbook.
Zooms the current page in, showing greater detail.
Zooms the current page out, showing less detail.
Fits the whole page into the screen space.
Fits the whole width of the page into the screen space.
Fits the whole height of the page into the screen space.
Previous Page Setup. | Contents | Next Getting Help from Other Sources |
Previous | Next |
This chapter describes other sources of help which are available to users including the Gnumeric web site, the mailing list, and the internet relay chat (IRC) discussion channel. The chapter also explains how to tell the project about a problem with the program.
Previous Print Preview. | Contents | Next Getting Help using Gnumeric |
Previous | Next |
This manual is the most complete source of explanation for Gnumeric and attempts to describe as much of the program as possible. However, this manual is not yet complete and there are many situtations which cannot be explained through a manual. There are several other sources of information which might be helpful.
![]() | Warning |
---|---|
Several of the sources of information below involve talking directly with the people who have created Gnumeric. These people are volunteers who have spend several years working on the program to make it useful. They will all be glad to help you but only if they decide they want to. They are all busy and only volunteer on this project. You can take several steps to make these people want to help you. First, please look carefully through this manual to see if you can answer your own question. This can be hard and requires careful thinking but will teach you the most. Second, look at the Gnumeric web site, look on the world wide web for explanations using other spreasheets or look for a book on how to use another spreadsheet. Finally, if you want to meet the developers and ask for their help directly then be nice. If you are using their program, consider introducing yourself and thanking them for their work. Then be polite as you talk to them. They are all nice people but may sound brisk because that is how they talk to each other. These developers will not spend time to make sure you do not become offended because they do not want to offend you. They want to help you quickly and then get back to their own work. Please assume they respect you and want to help you, after all they have written a program for you to use. |
Previous Getting Help from Other Sources | Contents | Next The Gnumeric Web Site and Other Web Resources |
Previous | Next |
Previous Getting Help using Gnumeric | Contents | Next The Gnumeric Web Site |
Previous | Next |
Gnumeric strives to mimic the behaviour of other spreadsheets so books which explain how to use these other spreadsheets will probably be useful to help understand Gnumeric.
Previous The Gnumeric Web Site and Other Web Resources | Contents | Next The Gnumeric Mailing List |
Previous | Next |
Previous The Gnumeric Web Site | Contents | Next Joining the Gnumeric Discussion Channel |
Previous | Next |
Previous The Gnumeric Mailing List | Contents | Next Reporting Bugs in the Program |
Previous | Next |
Previous Joining the Gnumeric Discussion Channel | Contents | Next Extending Gnumeric |
Previous | Next |
This chapter explains how to go about extending Gnumeric to provide extra functionality. Because Gnumeric is Free Software this is quite easy to do.
Previous Reporting Bugs in the Program | Contents | Next The Approaches to Extending Gnumeric |
Previous | Next |
There are several ways that Gnumeric can be extended to add functionality.
Previous Extending Gnumeric | Contents | Next Defining New Functions |
Previous | Next |
Previous The Approaches to Extending Gnumeric | Contents | Next Programming Gnumeric using Python |
Previous | Next |
A powerful way to access and manipulate data in Gnumeric involves using the Python programming language. As Gnumeric develops from version 1.2, the scripting methods will become increasingly powerful. Since Gnumeric is free software, you could extend it directly using the source code and adding C language functions to the code. Python offers a higher level abstraction through which to interact with the spreadsheet.
Python and Gnumeric can be used in several ways. This section will describe how to obtain Gnumeric, install it and get things configured correctly for access with Python. If you already have the pieces in place, you can skip the section the section called “Installing and Building Gnumeric for Python”.
This section was written by Charles Twardy. It owes a great deal to the nice guide Travis Whitton wrote: Python/Gnumeric guide for the old API in Gnumeric 1.0. Jon Käre Hellan contributed most of the code to enable Python in Gnumeric and wrote the file python-gnumeric.txt in the source tree. Nathan Hurst provided the idea and support.
![]() | Warning |
---|---|
The Python API, that is the list of methods available in Python, is still experimental and may change! |
For further information, the web page maintained by Jon Käre Hellan's has some python plugins and other useful information. That page can be found through this link. The main Gnumeric page may also have useful information.
If you need help online, you may want to check out:
The Gnumeric Function-Writer's Guide. Until I write one for Python, you'll have to settle for doc/developer/writing-functions.sgml in the Gnumeric source tree.
The files that actually define the Python interface. In particular, plugins/python-loader/py-gnumeric.c has good comments at the beginning.
The instructions on how to use GNOME CVS can be found here.
The gnumeric discussion list: <gnumeric-list@gnome.org>
The IRC channel #gnumeric on the GimpNet server. Right now, the project leader is Jody Goldberg (jody) and the Debianizer is: J.H.M. Dassen (jhm). Jody, Jon K. Hellan, and Zbigniew Chyla appear prominently in the Python ChangeLog.
This section describes how to obtain the Gnumeric source code, configure it for Python and build it. This section will eventually be removed as Python becomes supported by default.
I'm going to define some variables here so that you can insert the appropriate command or item for your system when they occur. I'll prefix them all with '$'.
$root: Do whatever you do to become root. The usual options are:
su - and hit Enter
sudo
fakeroot (works in some situations, but not all)
$version: Whatever your current Gnumeric version is. Some examples:
1.1.20
1.1.20-bonobo
1.1.90
You need to get Python and Gnumeric, and the Python plugin for Gnumeric. You can get the binaries, the packaged source, or the developing edge CVS.
I've only tested this on sid (unstable). The version you get from stable (woody) may not act quite the same.
$root apt-get install gnumeric gnumeric-python python
If you have Debian, and don't need the bleeding edge, this is by far the easiest way to get and build the source.
Change to a directory where you want to hang the source directory.
$root apt-get build-dep gnumeric
apt-get source gnumeric
cd gnumeric-$version
debian/rules build
To make the .deb packages: $root ./debian/rules binary
To install those .deb packages:
cd .. to change to that directory.
$root dpkg -i gnum*deb (presuming you don't have other .deb packages beginning with "gnum" lying around here.
You may or may not want to remove those .deb files now: $root rm gnum*deb)
Remember that this is the developing edge. Things may not work. Generally don't do this unless you are subscribed to the mail list and possibly also on the IRC channel.
You will need a few things for this to work at all:
gnome-common
libgsf (see below)
pygtk2 (On Debian, make sure to get python-gtk2 and python-gtk2-dev)
gnumeric (see below, obviously)
And although the following will build in the main build space, it's probably better to build in a temporary space. But I can't be bothered to learn how to fiddle the build pathways.
Change to a directory where you want to hang the source directory for Gnumeric and a few other Gnome things.
export CVSROOT=:pserver:anonymous@anoncvs.gnome.org:/cvs/gnome
cvs login (No password -- hit RETURN.)
Getting and building libgsf:
cvs co libgsf
cd libgsf
RedHat: ./autogen.sh
Debian: ./autogen.sh --prefix=/usr --with-gconf-schema-file-dir=/etc/gconf/schemas
make
$root make install
If you find that this didn't work, try make clean and then repeat from the autogen step.
Getting and building libgal No longer necessary! (13 June 2003)
Getting and building gnumeric:
cvs -z3 checkout gnumeric -d gnumeric-head
cd gnumeric-head
RedHat: ./autogen.sh and wait while it compiles
Debian: ./autogen.sh --prefix=/usr --with-gconf-schema-file-dir=/etc/gconf/schemas
make
Optional: $root make install
If you find that this didn't work, try make clean and then repeat from the autogen step. For example, sometimes I've had it not create the python-loader.
OK, you should now have gnumeric! Test it! If you installed the Debianized version via apt-get, or did "make install", it should be installed to /usr/bin (or /usr/local/bin on RedHat?) and you can just type gnumeric. Otherwise you will find it in gnumeric-head/src/ and you will have to run it from there.
There is an interactive Python console available from inside Gnumeric. This is a good place to explore things, and if the console is expanded, will be a nice place for scripting. In the meantime, what I have called "Spellbooks" below are much more useful, but are fixed plugins as of Gnumeric startup. So right now I putter in the console as I develop plugin literal in the form of spellbooks. After 1.2.0, Gnumeric will be working on its scripting API, so the two approaches may merge. Or not.
You can run a Python interpreter from inside Gnumeric, but you have to turn it on. To do this you simply uncomment a line in python-loader/plugins.xml. Normally, that file lives in /usr/lib/gnumeric/$version/plugins/python-loader/, or perhaps /usr/local/lib... on RedHat. I used to suggest making a local but you should probably make a local copy, but that was pain for little gain. So:
gnumeric --version to make sure you get the right version name for the following. (You'll have to do this for every new version of Gnumeric!).
cd ~/.gnumeric/ $version /plugins/
Edit python-loader/plugin.xml.
Uncomment the five lines starting with ui-console-menu service near the bottom (remove the "<!--" and "-->" tags around the <service...> and </service> tags.
Save the file.
Start gnumeric (same version).
Select from the Tools the Python console.
Enjoy!
At the top there is a drop-down menu Execute in. Right now your only choice will be Default. After you evaluate functions from other plugins, those environments will become available too (JK says this is called lazy loading). But I'll assume you are using Default. (The only real difference is that you have to import Gnumeric first, and you can't see your plugin functions.)
(Note: older releases required you to type print dir() instead of just dir(). Fixed in cvs 16 June 2003, and certainly in 1.1.20 and higher.
Let's start by taking a look at the environment.
>>> importGnumeric >>> dir() ['Gnumeric', '__builtins__', '__doc__', '__name__'] >>> dir(Gnumeric) ['Boolean', 'CellPos', 'FALSE', 'GnumericError', 'GnumericErrorDIV0', 'GnumericErrorNA', 'GnumericErrorNAME', 'GnumericErrorNULL', 'GnumericErrorNUM', 'GnumericErrorRECALC', 'GnumericErrorREF', 'GnumericErrorVALUE', 'MStyle', 'Range', 'TRUE', '__doc__', '__name__',
'functions', 'plugin_info', 'workbook_new', 'workbooks']
So do some exploring. First, let's poke around to figure out how to use CellPos.
# I wonder how to use CellPos (I've glanced at the source, but...) >>> dir(Gnumeric.CellPos) # shows nothing useful >>> Gnumeric.CellPos() TypeError: CellPos() takes exactly 2 arguments (0 given) >>> Gnumeric.CellPos("a1","a2") TypeError: an integer is required. # Right. >>> a=Gnumeric.CellPos(1,2) # It worked! >>> a <CellPos object at 0x106b6eb8> # Yeah, I know... >>> dir(a) ['get_tuple'] >>> a.get_tuple() (1,2) # Cool. That's (col,row) >>> str(a) # Super cool. 'B3' # JK hasn't implemented this for tuples yet
Similarly, we can explore Gnumeric.Range:
>>> r = Gnumeric.Range((1,2),(3,4)) TypeError: Range() argument 1 must be CellPos, not tuple >>> r = Gnumeric.Range(a,a) >>> r <Range object at 0x1071d888> >>> dir(r) ['get_tuple'] >>> r.get_tuple() (3, 7, 3, 7)
If you evaluate in the context of a plugin (rather than in Default), then dir(Gnumeric.plugin_info) will reveal some simple informational functions you can call for the local plugin(s).
Note: obviously I don't really know what I'm doing, or I wouldn't be poking around like this.
Jon K. Hellan writes, "Here are some more things you can do from the console:"
# Get a workbook >>> wb=Gnumeric.workbooks()[0] >>> wb <Workbook object at 0x862a490> >>> dir(wb) >>> ['gui_add', 'sheet_add', 'sheets'] # Get a sheet >>> s=wb.sheets()[0] >>> s <Sheet object at 0x863e8d0> >>> dir(s) ['cell_fetch', 'get_extent', 'get_name_unquoted', 'rename', 'style_apply_range', 'style_get', 'style_set_pos', 'style_set_range'] # Get a cell. s.cell_fetch(0,0) and s[0,0] are synonyms. First # coordinate is columns, i.e. s[1,0] is B1. >>> c=s[0,0] >>> c <Cell object at 0x863d810> >>> dir(c) ['get_entered_text', 'get_mstyle', 'get_rendered_text', 'get_value', 'get_value_as_string', 'set_text'] # Change the cell - it changes in the grid >>> c.set_text('foo') # Retrieve the cell - both ways. >>> c.get_value() foo >>> s.cell_fetch(0,0).get_value() foo
Very, very nice. Note, after setting a value, it won't show up until that cell is redrawn. That will happen automatically with plugin functions, but in the console, you may have to click on the cell.
To enable the Python-loader and Python plugins:
Select the Tools menu and the Plugins menuitem.
Select "Python plugin loader" and "Python functions". Restart Gnumeric.
The quickest way to test whether you now have Python functions is to type =py_capwords("fred flintstone") in the first cell. After you hit <Enter>, you should see "Fred Flintstone".
You can also click on the functions button, and scroll down to the "Python" category. Select that. You should see at least two functions defined: PY_CAPWORDS and PY_PRINTF. They're not very useful, but they prove you've got the plugins. Test them either via the GUI or by typing into the cell.
I'll presume they worked.
To scribe new magic you must write your spells in places where Gnumeric will find them. That place is in folders under: ~/.gnumeric/<version>/plugins/ Each folder under here is one "spellbook" of new plugin functions. You may put all your spells in one spellbook, or group them neatly depending on your tastes. Each spellbook must have two files. We'll create a spellbook called "myfuncs". A pedestrian name for pedestrian spells. When I have more skill, perhaps I'll make some with better names. Several suggest themselves:
Transformations: of obvious value for a spreadsheet
Illusions: statistical functions, clearly
Charms: presentation graphics
Necromancy: file repair and missing values?
Divination: data mining!
In many ways it would be easier to start by copying the py_func spellbook to your local .gnumeric folder, and just adding a function to that. But in general it will be more useful to be able to write your own separate spellbooks, so here we go.
Make the folder: First we make the folders and get into the right one. As noted above, we'll call our folder (spellbook) myfuncs.
If they don't already exist:
mkdir ~/.gnumeric
mkdir ~/.gnumeric/<version>
mkdir ~/.gnumeric/<version>/myfuncs/
cd ~/.gnumeric/<version>/myfuncs/
Make the files: A spellbook has two files. The first is the python file with the functions. The second is the XML file "plugin.xml". The XML file holds that master spells that tell Gnumeric what functions we've defined, and what the name of the python file is, and one other important item. We'll create these as blank files.
touch my-func.py
touch plugin.xml
Write the master spells The good news is that you only need to do this once per spellbook. After that you just add spells to it.
Your XML file must tell Gnumeric about your plugin. Here is a simple template. (If you want to learn about internationalization, see the example in the system's py-func spellbook.) Open up plugin.xml and insert the following lines:
<?xml version="1.0"?> <plugin id="Gnumeric_MyFuncPlugin"> <information> <name>Other Python functions from HOWTO</name> <description>A few extra python functions demonstrating the API.</description> </information> <loader type="Gnumeric_PythonLoader:python"> <attribute name="module_name" value="my-func"/></loader> <services> <service type="function_group" id="example">
<category>Local Python</category> <functions> </functions> </service> </services> </plugin>
Prepare to write the spells: Next we'll create a minimal python file. As noted above, we must name the file my-func.py and it must have a dictionary called example_functions. So open up my-func.py and insert the following lines.
# my-func.py # from Gnumeric import GnumericError GnumericErrorVALUE import Gnumeric import string example_functions = { }
To add new functions to Python, you now must do five things (three sir!):
Write the python function in your copy of my-func.py.
Insert the function info into the example_functions dictionary at the end of my_func.py
Insert the function name into the functions list at the end of plugin.xml.
Writing a simple script: Let's do something very simple: add two numbers together. First, edit my-func.py.
# Add two numbers together def func_add(num1, num2): return num1 + num2 # Translate the func_add python function to a gnumeric function and register it example_functions = { 'py_add': func_add }
Then let the plugin-loader(?) know about your function. Add the following line near the end of plugin.xml (between <functions> and </functions>).
<function name="py_add"/>
Now start Gnumeric and type py_add(2,3) into a cell. You should get "5". You can also use cell references. If that was in cell A1, go to cell A2 and type py_add(A1,3) and you will get "8". But your function won't show up in the GUI list yet.
Tell the GUI: To make your function show up in the GUI, you have to tell Gnumeric some things about it via a standard header, like this:
# Add two numbers together
def func_add(num1, num2):
'@FUNCTION=PY_ADD\n'\
'@SYNTAX=py_add(num1, num2)\n'\
'@DESCRIPTION=Adds two numbers together.\n'\
'Look, the description can go onto other lines.\n\n'\
'@EXAMPLES=To add two constants, just type them in: py_add(2,3)\n'\
'To add two cells, use the cell addresses: py_add(A1,A2)\n\n'\
'@SEEALSO='
return num1 + num2
The text after '@DESCRIPTION=' is the description that shows up in the function GUI. You can make it as simple or detailed as you want. I'm not sure how many other fields get used right now, as I haven't seen the EXAMPLES show up anywhere.
But this still isn't quite right. Gnumeric doesn't know how many arguments the function can handle, nor of what type. So the function GUI will prompt for the two values it knows about (as type "Any") and then keep prompting for more. But py_add cannot accept all types, nor can it handle more than two arguments, so unless you give it precisely 2 numbers, you will get an error when you click "OK".
Know your limits... We got away last time just because Gnumeric was forgiving. Now we need to say that we can accept only 2 values, of type floating-point (which will also handle ints).
Where before we had: 'py_add': func_add, we should now put: 'py_add': ('ff','num1,num2',func_add) This says that Gnumeric should expect two floating-point numbers ('ff') with names 'num1' and 'num2', and pass them to func_add.
...and surpass them Of course, there is no reason an add function shouldn't be able to handle a range. The simplest way to do that is to accept a range, and then call Gnumeric's own SUM function on it! All of Gnumeric's functions are available to you in the dictionary Gnumeric.functions, keyed by name. So here is how to write py_sum.
First, define func_sum (in my-func.py):
def func_sum(gRange): '@FUNCTION=PY_SUM\n'\ '@SYNTAX=PY_SUM(range)\n'\ '@DESCRIPTION=Adds a range of numbers together.'\ 'Just like built-in SUM.\n\n'\ '@EXAMPLES=To add values in A1 to A5, just type them in:\n'\ ' py_sum(a1:a5)\n'\ '@SEEALSO=' try: sum = Gnumeric.functions['sum'] val = sum(gRange) # val = reduce(lambda a,b: a+b, vals) except TypeError: raise GnumericError, GnumericErrorVALUE else: return val
Then insert it into your functions dictionary. That dictionary now looks like this (with 'r' denoting a range type):
example_functions = { 'py_add': ('ff','num1,num2',func_add), 'py_sum': ('r', 'values', func_sum) }
Finally, make an entry in the XML list, so that it now looks like:
<functions> <function name="py_add"/> <function name="py_sum"/> </functions>
I told you this was the easy way to do it. Obviously it's not very useful to just duplicate Gnumeric functions. But that's as far as I've made it. From what can tell, range objects are packaged as opaque pointers of type RangeRefObject. There seems to be no way to work with them from within Python, so we must rely on the Gnumeric functions.
All is not lost, despite the opaque pointers. For in Gnumeric we can read about all the functions that have been defined. Some of those take references (including RangeRefs) and return useful information. For example, under "Lookup" we find "Column" and "Row" which return arrays of all the column (or row) indices in the range. So we can redo the sum function.
Presume we can convert our RangeRef to a start tuple and and end tuple. Then we can write sum2:
def func_sum2(gRange): '@FUNCTION=PY_SUM2\n'\ '@SYNTAX=PY_SUM2(range)\n'\ '@DESCRIPTION=Adds a range of numbers together,'\ 'without calling built-in SUM.\n\n'\ '@EXAMPLES=To add values in A1 to A5, just type them in:\n'\ ' py_sum(a1:a5)\n'\ '@SEEALSO=' try: [r_begin, r_end] = range_ref_to_tuples(gRange) wb=Gnumeric.Workbooks()[0] # Careful! This is WRONG! It doesn't s=wb.sheets()[0] # use the ACTUAL workbook or sheet. val = 0 for col in range(r_begin[0], r_end[0]): for row in range(r_begin[1], r_end[1]): cell = s[col, row] val = val + cell.get_value() # Note: this doesn't skip blank cells etc. except TypeError: raise GnumericError,GnumericErrorVALUE else: return val
That's fine as far as it goes, but we need to define the helper function "range_ref_to_tuples". Although I'm rather ashamed to show this ugly literal, here's how I did it (someone suggest a better way, please!):
def range_ref_to_tuples(range_ref): '''I need a function to find the bounds of a RangeRef. This one extracts them from the Gnumeric "column" and "row" commands, and returns them as a pair of tuples. Surely there is a better way? For example, return a list of cells??''' col = Gnumeric.functions['column'] row = Gnumeric.functions['row'] # "column" and "row" take references and return an array of col or row # nums for each cell in the reference. For example, [[1, 1, 1], [2, 2, 2]] # for columns and [[2, 3, 4], [2, 3, 4]] for rows. try: columns = col(range_ref) rows = row(range_ref) begin_col = columns[0][0] - 1 begin_row = rows[0][0] - 1 end_col = columns[-1][-1] end_row = rows[-1][-1] # We subtracted 1 from the begin values because in the API, # indexing begins at 0, while "column" and "row" begin at 1. # We did NOT subtract 1 from the end values, in order to make # them suitable for Python's range(begin, end) paradigm. except TypeError: raise GnumericError,GnumericErrorVALUE except NameError: # right name? raise GnumericError,Gnumeric.GnumericErrorNAME except RefError: # right name? raise GnumericError,Gnumeric.GnumericErrorREF except NumError: # right name? raise GnumericError,Gnumeric.GnumericErrorNUM return [ (begin_col, begin_row), (end_col, end_row) ]
From there, insert the function into the dictionary, and insert its name into plugin.xml. I leave these as exercises to the reader (answers in the sample files -- no peeking!). Restart Gnumeric and you should be able to use py_sum2!
There are a couple of glitches:
It fails the first time with "could not import gobject". Just run again, I don't know what that's about.
It will only work for Workbook 1 and Sheet 1. JK thinks that there may be no way to get the current Workbook/Sheet in the Python API. Hrm....
As noted, it should do some simple trapping to skip blank or text-filled cells. That can be done! I just didn't. It's late.
Relative to the source tree:
The Python interface is defined in: plugins/python-loader/py-gnumeric.c That file also has good notes at the beginning.
There are interesting things about the way it used to be in: doc/developer/python-gnumeric.txt.
To upgrade, first choose any method from the installation section above. But note: when you upgrade your Gnumeric version, it will look for your Python scripts in the corresponding version-named subdirectories. For example, if your scripts are in "~/.gnumeric/1.1.17/plugins", but you just upgraded to 1.1.18, you may need to rename that to "~/.gnumeric/1.1.18/plugins". If you want to keep and run several versions of Gnumeric, you'll have to copy or symlink them.
If you want the Python console, you'll also have to re-enable it, following the directions above. If you had made a local copy of the old one, make sure you don't copy or link that to the new directory. It won't work.
Find the new version with gnumeric --version, making sure to invoke the proper gnumeric.
To be written....
Swapping ranges (not a normal cell function, but I wrote one) that did this. But now I can rewrite it using the GUI, which will make a lot more sense.
JK's python-only transpose function
A Gnumeric interface to the Snob clustering algorithm. Coming soon to a spreadsheet near you!
Previous Defining New Functions | Contents | Next Writing New Plugins |
Previous | Next |
Previous Programming Gnumeric using Python | Contents | Next Adding to the Gnumeric Program |
Previous | Next |
Previous Writing New Plugins | Contents | Next About Gnumeric |
Previous | Next |
This chapter provides some background information on the creation and distribution of Gnumeric.
Previous Adding to the Gnumeric Program | Contents | Next The History of Gnumeric |
Previous | Next |
Previous About Gnumeric | Contents | Next Authors |
Previous | Next |
Table 15.1. Gnumeric was written by
Miguel de Icaza | Creator | <miguel@gnome.com> |
Jody Goldberg | Maintainer | <jody@gnome.org> |
Morten Welinder | Core development, Purification | |
Jon K. Hellan | Core Development, GUI | |
Jukka-Pekka Iivonen | Core Development, Functions and Tools | |
Michael Meeks | Core Development, Excel | |
Almer S. Tigelaar | Core Development, STF, Autoformat | |
Sean Atkinson | Functions and X-Base importing | |
Kenneth Christiansen | i18n, misc stuff | |
Zbigniew Chyla | Plugin system, i18n, python | |
Tom Dyas | Plugin system | |
ERDI Gergo | Misc widgets | |
Andreas J. Guelzow | Statistics Tools, HTML and LaTeX exporters | |
Ross Ihaka | Special functions | |
Lutz Muller | SheetObject improvement | |
Yukihiro Nakai | Input method and multi-byte character support | |
Federico M. Quintero | Canvas support | |
JP Rosevear | Sorting, and INDEX | |
Ariel Rios | Guile support | |
Mark Probst | Guile support | |
Frank Chiulli | OLE support | |
Arturo Tena | OLE support | |
Tuomas Kuosmanen | Art | |
Jakub Steiner | Art | |
Grandma Chema Celorio | QA and sheet copy. | |
Juan Pablo | QA | |
Kevin Breit | Documentation | |
Thomas Canty | Documentation | |
Adrian Custer | QA, Documentation | |
Adrian Likins | QA, Documentation | |
Wayne Schuller | Documentation, printer headers | |
Aaron Weber | Documentation | |
Alexander Kirillov | Documentation | |
J.H.M. (Ray) Dassen | Debian packaging | |
John Gotts | RPM packaging | |
Takashi Matsuda | Original text plugin | |
Vincent Renardias | Original CSV support | |
Alan Cox | 2nd csv plugin | |
Bruno Unna | Original fmt dialog | |
Daniel Veillard | Original DOM support | |
Vladimir Vuksan | Original financial functions | |
Jakub Jelinek | Early canvas work | |
Chris Lahey | Original number format engine | |
Rasca | Original HTML, Troff, LaTeX exporters |
To find more information about Gnumeric, please visit the Web site.
If you have some comments or suggestions regarding this application or documentation, need help, or want to report a bug, please contact us! Either via the web. or on the mailing list
Previous The History of Gnumeric | Contents | Next License |
Previous | Next |
Gnumeric is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Gnumeric is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
A copy of the GNU General Public License is included as an appendix to the GNOME Users Guide. You may also obtain a copy of the GNU General Public License from the Free Software Foundation by visiting their Web site or by writing to
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307
USA
Previous Authors | Contents | Next How to Build Gnumeric from Source Code |
Previous | Next |
Previous License | Contents | Next How to Get Involved in Gnumeric |
Previous | Next |
Previous How to Build Gnumeric from Source Code | Contents | Next Function Reference |
Previous | Next |
This appendix provides a list of all the functions which are currently defined in Gnumeric.
Previous How to Get Involved in Gnumeric | Contents | Next Alphabetical List of Gnumeric Functions |
Previous | Next |
BITLSHIFT —
BITLSHIFT(x,n)
COMPLEX —
COMPLEX(real,im[,suffix])
COMPLEX returns a complex number of the form x + yi.
real is the real and im is the imaginary part of the complex number. suffix is the suffix for the imaginary part. If it is omitted, COMPLEX uses 'i' by default.
If suffix is neither 'i' nor 'j', COMPLEX returns #VALUE! error.
This function is Excel compatible.
IMABS —
IMABS(inumber)
IMAGINARY —
IMAGINARY(inumber)
IMARCCOS —
IMARCCOS(inumber)
IMARCCOSH —
IMARCCOSH(inumber)
IMARCCOT —
IMARCCOT(inumber)
IMARCCOTH —
IMARCCOTH(inumber)
IMARCCSC —
IMARCCSC(inumber)
IMARCCSCH —
IMARCCSCH(inumber)
IMARCSEC —
IMARCSEC(inumber)
IMARCSECH —
IMARCSECH(inumber)
IMARCSIN —
IMARCSIN(inumber)
IMARCSINH —
IMARCSINH(inumber)
IMARCTAN —
IMARCTAN(inumber)
IMARCTANH —
IMARCTANH(inumber)
IMARGUMENT —
IMARGUMENT(inumber)
IMCONJUGATE —
IMCONJUGATE(inumber)
IMCOS —
IMCOS(inumber)
IMCOSH —
IMCOSH(inumber)
IMCOT —
IMCOT(inumber)
IMCOTH —
IMCOTH(inumber)
IMCSC —
IMCSC(inumber)
IMCSCH —
IMCSCH(inumber)
IMDIV —
IMDIV(inumber1,inumber2)
IMEXP —
IMEXP(inumber)
IMINV —
IMINV(inumber)
IMLN —
IMLN(inumber)
IMLN returns the natural logarithm of a complex number.
The result will have an imaginary part between -pi and +pi. The natural logarithm is not uniquely defined on complex numbers. You may need to add or subtract an even multiple of pi to the imaginary part.
If inumber is not a valid complex number, IMLN returns #VALUE! error.
This function is Excel compatible.
IMLOG10 —
IMLOG10(inumber)
IMLOG2 —
IMLOG2(inumber)
IMNEG —
IMNEG(inumber)
IMPOWER —
IMPOWER(inumber1,inumber2)
IMPRODUCT —
IMPRODUCT(inumber1[,inumber2,...])
IMREAL —
IMREAL(inumber)
IMSEC —
IMSEC(inumber)
IMSECH —
IMSECH(inumber)
IMSIN —
IMSIN(inumber)
IMSINH —
IMSINH(inumber)
IMSQRT —
IMSQRT(inumber)
IMSUB —
IMSUB(inumber1,inumber2)
IMSUM —
IMSUM(inumber1,inumber2)
IMTAN —
IMTAN(inumber)
DAVERAGE —
DAVERAGE(database,field,criteria)
DAVERAGE function returns the average of the values in a list or database that match conditions specified.
database is a range of cells in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.
field specifies which column is used in the function. If field is an integer, for example 2, the second column is used. Field can also be the label of a column. For example, ``Age'' refers to the column with the label ``Age'' in database range.
criteria is the range of cells which contains the specified conditions. The first row of a criteria should contain the labels of the fields for which the criteria are for. Cells below the labels specify conditions, for example, ``>3'' or ``<9''. Equality condition can be given simply by specifying a value, e.g. ``3'' or ``John''.
Each row in criteria specifies a separate condition. If a row in database matches a row in criteria, then that row is counted. Technically speaking, this a boolean OR operation between the rows in criteria.
If criteria specifies more than one column, then each of the conditions in the specified columns must be true for the row in database to match. Technically speaking, this is a boolean AND operation between the columns in criteria.
Let us assume that the range A1:C7 contain the following values:
Name Age Salary
John 34 54342
Bill 35 22343
Clark 29 34323
Bob 43 47242
Susan 37 42932
Jill 45 45324
In addition, the cells A9:B11 contain the following values:
Age Salary
<30
>40 >46000
DAVERAGE(A1:C7, "Salary", A9:A11) equals 42296.3333.
DAVERAGE(A1:C7, "Age", A9:A11) equals 39.
DAVERAGE(A1:C7, "Salary", A9:B11) equals 40782.5.
DAVERAGE(A1:C7, "Age", A9:B11) equals 36.
DCOUNT —
DCOUNT(database,field,criteria)
DCOUNT function counts the cells that contain numbers in a database that match conditions specified.
database is a range of cells in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.
field specifies which column is used in the function. If field is an integer, for example 2, the second column is used. Field can also be the label of a column. For example, ``Age'' refers to the column with the label ``Age'' in database range.
criteria is the range of cells which contains the specified conditions. The first row of a criteria should contain the labels of the fields for which the criteria are for. Cells below the labels specify conditions, for example, ``>3'' or ``<9''. Equality condition can be given simply by specifying a value, e.g. ``3'' or ``John''.
Each row in criteria specifies a separate condition. If a row in database matches a row in criteria, then that row is counted. Technically speaking, this a boolean OR operation between the rows in criteria.
If criteria specifies more than one column, then each of the conditions in the specified columns must be true for the row in database to match. Technically speaking, this is a boolean AND operation between the columns in criteria.
Let us assume that the range A1:C7 contain the following values:
Name Age Salary
John 34 54342
Bill 35 22343
Clark 29 34323
Bob 43 47242
Susan 37 42932
Jill 45 45324
In addition, the cells A9:B11 contain the following values:
Age Salary
<30
>40 >46000
DCOUNT(A1:C7, "Salary", A9:A11) equals 3.
DCOUNT(A1:C7, "Salary", A9:B11) equals 2.
DCOUNT(A1:C7, "Name", A9:B11) equals 0.
DCOUNTA —
DCOUNTA(database,field,criteria)
DCOUNTA function counts the cells that contain data in a database that match conditions specified.
database is a range of cells in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.
field specifies which column is used in the function. If field is an integer, for example 2, the second column is used. Field can also be the label of a column. For example, ``Age'' refers to the column with the label ``Age'' in database range.
criteria is the range of cells which contains the specified conditions. The first row of a criteria should contain the labels of the fields for which the criteria are for. Cells below the labels specify conditions, for example, ``>3'' or ``<9''. Equality condition can be given simply by specifying a value, e.g. ``3'' or ``John''.
Each row in criteria specifies a separate condition. If a row in database matches a row in criteria, then that row is counted. Technically speaking, this a boolean OR operation between the rows in criteria.
If criteria specifies more than one column, then each of the conditions in the specified columns must be true for the row in database to match. Technically speaking, this is a boolean AND operation between the columns in criteria.
Let us assume that the range A1:C7 contain the following values:
Name Age Salary
John 34 54342
Bill 35 22343
Clark 29 34323
Bob 43 47242
Susan 37 42932
Jill 45 45324
In addition, the cells A9:B11 contain the following values:
Age Salary
<30
>40 >46000
DCOUNTA(A1:C7, "Salary", A9:A11) equals 3.
DCOUNTA(A1:C7, "Salary", A9:B11) equals 2.
DCOUNTA(A1:C7, "Name", A9:B11) equals 2.
DGET —
DGET(database,field,criteria)
DGET function returns a single value from a column that match conditions specified.
database is a range of cells in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.
field specifies which column is used in the function. If field is an integer, for example 2, the second column is used. Field can also be the label of a column. For example, ``Age'' refers to the column with the label ``Age'' in database range.
criteria is the range of cells which contains the specified conditions. The first row of a criteria should contain the labels of the fields for which the criteria are for. Cells below the labels specify conditions, for example, ``>3'' or ``<9''. Equality condition can be given simply by specifying a value, e.g. ``3'' or ``John''.
Each row in criteria specifies a separate condition. If a row in database matches a row in criteria, then that row is counted. Technically speaking, this a boolean OR operation between the rows in criteria.
If criteria specifies more than one column, then each of the conditions in the specified columns must be true for the row in database to match. Technically speaking, this is a boolean AND operation between the columns in criteria.
Let us assume that the range A1:C7 contain the following values:
Name Age Salary
John 34 54342
Bill 35 22343
Clark 29 34323
Bob 43 47242
Susan 37 42932
Jill 45 45324
In addition, the cells A9:B11 contain the following values:
Age Salary
<30
>40 >46000
If none of the items match the conditions, DGET returns #VALUE! error.
If more than one items match the conditions, DGET returns #NUM! error.
DGET(A1:C7, "Salary", A9:A10) equals 34323.
DGET(A1:C7, "Name", A9:A10) equals "Clark".
DMAX —
DMAX(database,field,criteria)
DMAX function returns the largest number in a column that match conditions specified.
database is a range of cells in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.
field specifies which column is used in the function. If field is an integer, for example 2, the second column is used. Field can also be the label of a column. For example, ``Age'' refers to the column with the label ``Age'' in database range.
criteria is the range of cells which contains the specified conditions. The first row of a criteria should contain the labels of the fields for which the criteria are for. Cells below the labels specify conditions, for example, ``>3'' or ``<9''. Equality condition can be given simply by specifying a value, e.g. ``3'' or ``John''.
Each row in criteria specifies a separate condition. If a row in database matches a row in criteria, then that row is counted. Technically speaking, this a boolean OR operation between the rows in criteria.
If criteria specifies more than one column, then each of the conditions in the specified columns must be true for the row in database to match. Technically speaking, this is a boolean AND operation between the columns in criteria.
Let us assume that the range A1:C7 contain the following values:
Name Age Salary
John 34 54342
Bill 35 22343
Clark 29 34323
Bob 43 47242
Susan 37 42932
Jill 45 45324
In addition, the cells A9:B11 contain the following values:
Age Salary
<30
>40 >46000
DMAX(A1:C7, "Salary", A9:A11) equals 47242.
DMAX(A1:C7, "Age", A9:A11) equals 45.
DMAX(A1:C7, "Age", A9:B11) equals 43.
DMIN —
DMIN(database,field,criteria)
DMIN function returns the smallest number in a column that match conditions specified.
database is a range of cells in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.
field specifies which column is used in the function. If field is an integer, for example 2, the second column is used. Field can also be the label of a column. For example, ``Age'' refers to the column with the label ``Age'' in database range.
criteria is the range of cells which contains the specified conditions. The first row of a criteria should contain the labels of the fields for which the criteria are for. Cells below the labels specify conditions, for example, ``>3'' or ``<9''. Equality condition can be given simply by specifying a value, e.g. ``3'' or ``John''.
Each row in criteria specifies a separate condition. If a row in database matches a row in criteria, then that row is counted. Technically speaking, this a boolean OR operation between the rows in criteria.
If criteria specifies more than one column, then each of the conditions in the specified columns must be true for the row in database to match. Technically speaking, this is a boolean AND operation between the columns in criteria.
Let us assume that the range A1:C7 contain the following values:
Name Age Salary
John 34 54342
Bill 35 22343
Clark 29 34323
Bob 43 47242
Susan 37 42932
Jill 45 45324
In addition, the cells A9:B11 contain the following values:
Age Salary
<30
>40 >46000
DMIN(A1:C7, "Salary", A9:B11) equals 34323.
DMIN(A1:C7, "Age", A9:B11) equals 29.
DPRODUCT —
DPRODUCT(database,field,criteria)
DPRODUCT function returns the product of numbers in a column that match conditions specified.
database is a range of cells in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.
field specifies which column is used in the function. If field is an integer, for example 2, the second column is used. Field can also be the label of a column. For example, ``Age'' refers to the column with the label ``Age'' in database range.
criteria is the range of cells which contains the specified conditions. The first row of a criteria should contain the labels of the fields for which the criteria are for. Cells below the labels specify conditions, for example, ``>3'' or ``<9''. Equality condition can be given simply by specifying a value, e.g. ``3'' or ``John''.
Each row in criteria specifies a separate condition. If a row in database matches a row in criteria, then that row is counted. Technically speaking, this a boolean OR operation between the rows in criteria.
If criteria specifies more than one column, then each of the conditions in the specified columns must be true for the row in database to match. Technically speaking, this is a boolean AND operation between the columns in criteria.
DSTDEV —
DSTDEV(database,field,criteria)
DSTDEV function returns the estimate of the standard deviation of a population based on a sample. The populations consists of numbers that match conditions specified.
database is a range of cells in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.
field specifies which column is used in the function. If field is an integer, for example 2, the second column is used. Field can also be the label of a column. For example, ``Age'' refers to the column with the label ``Age'' in database range.
criteria is the range of cells which contains the specified conditions. The first row of a criteria should contain the labels of the fields for which the criteria are for. Cells below the labels specify conditions, for example, ``>3'' or ``<9''. Equality condition can be given simply by specifying a value, e.g. ``3'' or ``John''.
Each row in criteria specifies a separate condition. If a row in database matches a row in criteria, then that row is counted. Technically speaking, this a boolean OR operation between the rows in criteria.
If criteria specifies more than one column, then each of the conditions in the specified columns must be true for the row in database to match. Technically speaking, this is a boolean AND operation between the columns in criteria.
Let us assume that the range A1:C7 contain the following values:
Name Age Salary
John 34 54342
Bill 35 22343
Clark 29 34323
Bob 43 47242
Susan 37 42932
Jill 45 45324
In addition, the cells A9:B11 contain the following values:
Age Salary
<30
>40 >46000
DSTDEV(A1:C7, "Age", A9:B11) equals 9.89949.
DSTDEV(A1:C7, "Salary", A9:B11) equals 9135.112506.
DSTDEVP —
DSTDEVP(database,field,criteria)
DSTDEVP function returns the standard deviation of a population based on the entire populations. The populations consists of numbers that match conditions specified.
database is a range of cells in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.
field specifies which column is used in the function. If field is an integer, for example 2, the second column is used. Field can also be the label of a column. For example, ``Age'' refers to the column with the label ``Age'' in database range.
criteria is the range of cells which contains the specified conditions. The first row of a criteria should contain the labels of the fields for which the criteria are for. Cells below the labels specify conditions, for example, ``>3'' or ``<9''. Equality condition can be given simply by specifying a value, e.g. ``3'' or ``John''.
Each row in criteria specifies a separate condition. If a row in database matches a row in criteria, then that row is counted. Technically speaking, this a boolean OR operation between the rows in criteria.
If criteria specifies more than one column, then each of the conditions in the specified columns must be true for the row in database to match. Technically speaking, this is a boolean AND operation between the columns in criteria.
Let us assume that the range A1:C7 contain the following values:
Name Age Salary
John 34 54342
Bill 35 22343
Clark 29 34323
Bob 43 47242
Susan 37 42932
Jill 45 45324
In addition, the cells A9:B11 contain the following values:
Age Salary
<30
>40 >46000
DSTDEVP(A1:C7, "Age", A9:B11) equals 7.
DSTDEVP(A1:C7, "Salary", A9:B11) equals 6459.5.
DSUM —
DSUM(database,field,criteria)
DSUM function returns the sum of numbers in a column that match conditions specified.
database is a range of cells in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.
field specifies which column is used in the function. If field is an integer, for example 2, the second column is used. Field can also be the label of a column. For example, ``Age'' refers to the column with the label ``Age'' in database range.
criteria is the range of cells which contains the specified conditions. The first row of a criteria should contain the labels of the fields for which the criteria are for. Cells below the labels specify conditions, for example, ``>3'' or ``<9''. Equality condition can be given simply by specifying a value, e.g. ``3'' or ``John''.
Each row in criteria specifies a separate condition. If a row in database matches a row in criteria, then that row is counted. Technically speaking, this a boolean OR operation between the rows in criteria.
If criteria specifies more than one column, then each of the conditions in the specified columns must be true for the row in database to match. Technically speaking, this is a boolean AND operation between the columns in criteria.
Let us assume that the range A1:C7 contain the following values:
Name Age Salary
John 34 54342
Bill 35 22343
Clark 29 34323
Bob 43 47242
Susan 37 42932
Jill 45 45324
In addition, the cells A9:B11 contain the following values:
Age Salary
<30
>40 >46000
DSUM(A1:C7, "Age", A9:B11) equals 72.
DSUM(A1:C7, "Salary", A9:B11) equals 81565.
DVAR —
DVAR(database,field,criteria)
DVAR function returns the estimate of variance of a population based on a sample. The populations consists of numbers that match conditions specified.
database is a range of cells in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.
field specifies which column is used in the function. If field is an integer, for example 2, the second column is used. Field can also be the label of a column. For example, ``Age'' refers to the column with the label ``Age'' in database range.
criteria is the range of cells which contains the specified conditions. The first row of a criteria should contain the labels of the fields for which the criteria are for. Cells below the labels specify conditions, for example, ``>3'' or ``<9''. Equality condition can be given simply by specifying a value, e.g. ``3'' or ``John''.
Each row in criteria specifies a separate condition. If a row in database matches a row in criteria, then that row is counted. Technically speaking, this a boolean OR operation between the rows in criteria.
If criteria specifies more than one column, then each of the conditions in the specified columns must be true for the row in database to match. Technically speaking, this is a boolean AND operation between the columns in criteria.
Let us assume that the range A1:C7 contain the following values:
Name Age Salary
John 34 54342
Bill 35 22343
Clark 29 34323
Bob 43 47242
Susan 37 42932
Jill 45 45324
In addition, the cells A9:B11 contain the following values:
Age Salary
<30
>40 >46000
DVAR(A1:C7, "Age", A9:B11) equals 98.
DVAR(A1:C7, "Salary", A9:B11) equals 83450280.5.
DVARP —
DVARP(database,field,criteria)
DVARP function returns the variance of a population based on the entire populations. The populations consists of numbers that match conditions specified.
database is a range of cells in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.
field specifies which column is used in the function. If field is an integer, for example 2, the second column is used. Field can also be the label of a column. For example, ``Age'' refers to the column with the label ``Age'' in database range.
criteria is the range of cells which contains the specified conditions. The first row of a criteria should contain the labels of the fields for which the criteria are for. Cells below the labels specify conditions, for example, ``>3'' or ``<9''. Equality condition can be given simply by specifying a value, e.g. ``3'' or ``John''.
Each row in criteria specifies a separate condition. If a row in database matches a row in criteria, then that row is counted. Technically speaking, this a boolean OR operation between the rows in criteria.
If criteria specifies more than one column, then each of the conditions in the specified columns must be true for the row in database to match. Technically speaking, this is a boolean AND operation between the columns in criteria.
Let us assume that the range A1:C7 contain the following values:
Name Age Salary
John 34 54342
Bill 35 22343
Clark 29 34323
Bob 43 47242
Susan 37 42932
Jill 45 45324
In addition, the cells A9:B11 contain the following values:
Age Salary
<30
>40 >46000
DVARP(A1:C7, "Age", A9:B11) equals 49.
DVARP(A1:C7, "Salary", A9:B11) equals 41725140.25.
GETPIVOTDATA —
GETPIVOTDATA(pivot_table,field_name)
DATE —
DATE (year,month,day)
DATE returns the number of days since the 1st of January of 1900(the date serial number) for the given year, month and day.
If month < 1 or month > 12, the year will be corrected. A similar correction takes place for days.
The years should be at least 1900. If years < 1900, it is assumed to be 1900 + years.
If the given date is not valid, DATE returns #NUM! error.
This function is Excel compatible.
DATE2UNIX —
DATE2UNIX(serial)
DATEDIF —
DATEDIF(date1,date2,interval)
DATEDIF returns the difference between two dates. interval is one of six possible values: "y", "m", "d", "ym", "md", and "yd".
The first three options will return the number of complete years, months, or days, respectively, between the two dates specified.
"ym" will return the number of full months between the two dates, not including the difference in years.
"md" will return the number of full days between the two dates, not including the difference in months.
"yd" will return the number of full days between the two dates, not including the difference in years.
This function is Excel compatible.
DATEVALUE —
DATEVALUE(date_str)
DAY —
DAY (date)
DAYS360 —
DAYS360 (date1,date2,method)
DAYS360 returns the number of days from date1 to date2 following a 360-day calendar in which all months are assumed to have 30 days.
If method is 1, the European method will be used. In this case, if the day of the month is 31 it will be considered as 30.
If method is 0 or omitted, the XL US method will be used. This is a somewhat complicated industry standard method where the last day of February is considered to be the 30th day of the month, but only for the first date.
If method is 2, a saner version of the US method is used in which both dates get the same February treatment.
Note that Gnumeric will perform regular string to serial number conversion for you, so you can enter a date as a string.
This function is mostly Excel compatible.
EDATE —
EDATE(date,months)
EDATE returns the serial number of the date that is the specified number of months before or after a given date. date is the serial number of the initial date and months is the number of months before (negative number) or after (positive number) the initial date.
If months is not an integer, it is truncated.
This function is Excel compatible.
EOMONTH —
EOMONTH (start_date,months)
EOMONTH returns the last day of the month which is months from the start_date.
EOMONTH returns #NUM! if start_date or months are invalid.
This function is Excel compatible.
HOUR —
HOUR (date)
ISOWEEKNUM —
ISOWEEKNUM (date)
ISOWEEKNUM returns the ISO 8601 week number of date.
An ISO 8601 week starts on Monday. Weeks are numbered from 1. A week including days from two different years is assigned to the year which includes the most days. This means that Dec 31 could be in week 1 of the following year, and Jan 1 could be in week 52 or 53 of the previous year. ISOWEEKNUM returns the week number.
ISOWEEKNUM returns #NUM! if date is invalid.
ISOYEAR —
ISOYEAR (date)
ISOYEAR returns the year of the ISO 8601 week number of date.
An ISO 8601 week starts on Monday. Weeks are numbered from 1. A week including days from two different years is assigned to the year which includes the most days. This means that Dec 31 could be in week 1 of the following year, and Jan 1 could be in week 52 or 53 of the previous year. ISOYEAR returns the year the week is assigned to.
ISOYEAR returns #NUM! if date is invalid.
MINUTE —
MINUTE (date)
MONTH —
MONTH (date)
NETWORKDAYS —
NETWORKDAYS (start_date,end_date[,holidays])
NOW —
NOW ()
NOW returns the serial number for the date and time at the time it is evaluated.
Serial Numbers in Gnumeric are represented as follows:The integral part is the number of days since the 1st of January of 1900. The decimal part represent the fraction of the day and is mapped into hour, minutes and seconds.
For example: .0 represents the beginning of the day, and 0.5 represents noon.
This function is Excel compatible.
SECOND —
SECOND (date)
TIMEVALUE —
TIMEVALUE (timetext)
TODAY —
TODAY()
UNIX2DATE —
UNIX2DATE(unixtime)
WEEKDAY —
WEEKDAY (date[, method])
WEEKDAY converts a serial number to a weekday.
This function returns an integer indicating the day of week.
METHOD indicates the numbering system. It defaults to 1.
For METHOD=1: Sunday is 1, Monday is 2, etc.
For METHOD=2: Monday is 1, Tuesday is 2, etc.
For METHOD=3: Monday is 0, Tuesday is 1, etc.
Note that Gnumeric will perform regular string to serial number conversion for you, so you can enter a date as a string.
This function is Excel compatible.
WEEKNUM —
WEEKNUM (date[,method])
WEEKNUM returns the week number of date according to the given method.
method defaults to 1.
For method=1, week starts on Sunday, and days before first Sunday are in week 0.
For method=2, week starts on Monday, and days before first Monday are in week 0.
For method=150, the ISO 8601 week number is returned.
WEEKNUM returns #NUM! if date or method is invalid.
This function is Excel compatible, except that Excel does not support ISO 8601 week numbers.
WORKDAY —
WORKDAY (start_date,days[,holidays])
YEAR —
YEAR (date)
BESSELI —
BESSELI(x,y)
BESSELI function returns the Neumann, Weber or Bessel function.
x is where the function is evaluated. y is the order of the Bessel function, if non-integer it is truncated.
If x or y are not numeric a #VALUE! error is returned.
If y < 0 a #NUM! error is returned.
This function is Excel compatible.
BESSELJ —
BESSELJ(x,y)
BESSELK —
BESSELK(x,y)
BESSELK function returns the Neumann, Weber or Bessel function. x is where the function is evaluated. y is the order of the Bessel function, if non-integer it is truncated.
If x or y are not numeric a #VALUE! error is returned.
If y < 0 a #NUM! error is returned.
This function is Excel compatible.
BESSELY —
BESSELY(x,y)
BESSELY function returns the Neumann, Weber or Bessel function.
x is where the function is evaluated. y is the order of the Bessel function, if non-integer it is truncated.
If x or y are not numeric a #VALUE! error is returned.
If y < 0 a #NUM! error is returned.
This function is Excel compatible.
BIN2DEC —
BIN2DEC(x)
BIN2HEX —
BIN2HEX(number[,places])
BIN2OCT —
BIN2OCT(number[,places])
CONVERT —
CONVERT(number,from_unit,to_unit)
CONVERT returns a conversion from one measurement system to another. For example, you can convert a weight in pounds to a weight in grams. number is the value you want to convert, from_unit specifies the unit of the number, and to_unit is the unit for the result.
from_unit and to_unit can be any of the following:
Weight and mass:
'g' Gram
'sg' Slug
'lbm' Pound
'u' U (atomic mass)
'ozm' Ounce
Distance:
'm' Meter
'mi' Statute mile
'Nmi' Nautical mile
'in' Inch
'ft' Foot
'yd' Yard
'ang' Angstrom
'Pica' Pica
Time:
'yr' Year
'day' Day
'hr' Hour
'mn' Minute
'sec' Second
Pressure:
'Pa' Pascal
'atm' Atmosphere
'mmHg' mm of Mercury
Force:
'N' Newton
'dyn' Dyne
'lbf' Pound force
Energy:
'J' Joule
'e' Erg
'c' Thermodynamic calorie
'cal' IT calorie
'eV' Electron volt
'HPh' Horsepower-hour
'Wh' Watt-hour
'flb' Foot-pound
'BTU' BTU
Power:
'HP' Horsepower
'W' Watt
Magnetism:
'T' Tesla
'ga' Gauss
Temperature:
'C' Degree Celsius
'F' Degree Fahrenheit
'K' Degree Kelvin
Liquid measure:
'tsp' Teaspoon
'tbs' Tablespoon
'oz' Fluid ounce
'cup' Cup
'pt' Pint
'qt' Quart
'gal' Gallon
'l' Liter
For metric units any of the following prefixes can be used:
'Y' yotta 1E+24
'Z' zetta 1E+21
'E' exa 1E+18
'P' peta 1E+15
'T' tera 1E+12
'G' giga 1E+09
'M' mega 1E+06
'k' kilo 1E+03
'h' hecto 1E+02
'e' deka 1E+01
'd' deci 1E-01
'c' centi 1E-02
'm' milli 1E-03
'u' micro 1E-06
'n' nano 1E-09
'p' pico 1E-12
'f' femto 1E-15
'a' atto 1E-18
'z' zepto 1E-21
'y' yocto 1E-24
If from_unit and to_unit are different types, CONVERT returns #NUM! error.
This function is Excel compatible.
DEC2BIN —
DEC2BIN(number[,places])
DEC2HEX —
DEC2HEX(number[,places])
DEC2OCT —
DEC2OCT(number[,places])
DELTA —
DELTA(x[,y])
ERF —
ERF([lower limit,]upper_limit)
ERF returns the error function. With a single argument ERF returns the error function, defined as
erf(x) = 2/sqrt(pi)* integral from 0 to x of exp(-t*t) dt.
If two arguments are supplied, they are the lower and upper limits of the integral.
If either lower_limit or upper_limit is not numeric a #VALUE! error is returned.
This function is upward-compatible with that in Excel. (If two arguments are supplied, Excel will not allow either to be negative.)
ERFC —
ERFC(x)
GESTEP —
GESTEP(x[,y])
HEX2BIN —
HEX2BIN(number[,places])
HEX2DEC —
HEX2DEC(x)
HEX2OCT —
HEX2OCT(number[,places])
OCT2BIN —
OCT2BIN(number[,places])
OCT2DEC —
OCT2DEC(x)
ACCRINT —
ACCRINT(issue,first_interest,settlement,rate,par,frequency[,basis])
ACCRINT calculates the accrued interest for a security that pays periodic interest.
issue is the issue date of the security. first_interest is the first interest date of the security. settlement is the settlement date of the security. The settlement date is always after the issue date (the date when the security is bought). rate is the annual rate of the security and par is the par value of the security. frequency is the number of coupon payments per year.
Allowed frequencies are:
1 = annual,
2 = semi,
4 = quarterly.
basis is the type of day counting system you want to use:
0 US 30/360
1 actual days/actual days
2 actual days/360
3 actual days/365
4 European 30/360
If issue date, first_interest date, or settlement date is not valid, ACCRINT returns #NUM! error.
The dates must be issue < first_interest < settlement, or ACCRINT returns #NUM! error.
If rate <= 0 or par <= 0 , ACCRINT returns #NUM! error.
If basis is omitted, US 30/360 is applied.
If basis < 0 or basis > 4, ACCRINT returns #NUM! error.
If issue date is after settlement date or they are the same, ACCRINT returns #NUM! error.
ACCRINTM —
ACCRINTM(issue,maturity,rate[,par,basis])
ACCRINTM calculates and returns the accrued interest for a security from issue to maturity date.
issue is the issue date of the security. maturity is the maturity date of the security. rate is the annual rate of the security and par is the par value of the security. If you omit par, ACCRINTM applies $1,000 instead. basis is the type of day counting system you want to use:
0 US 30/360
1 actual days/actual days
2 actual days/360
3 actual days/365
4 European 30/360
If issue date or maturity date is not valid, ACCRINTM returns #NUM! error.
If rate <= 0 or par <= 0, ACCRINTM returns #NUM! error.
If basis is omitted, US 30/360 is applied.
If basis < 0 or basis > 4, ACCRINTM returns #NUM! error.
If issue date is after maturity date or they are the same, ACCRINTM returns #NUM! error.
AMORDEGRC —
AMORDEGRC(cost,purchase_date,first_period,salvage,period,rate[,basis])
AMORDEGRC: Calculates depreciation for each accounting period using French accounting conventions. Assets purchased in the middle of a period take prorated depreciation into account. This is similar to AMORLINC, except that a depreciation coefficient is applied in the calculation depending on the life of the assets.
Named for AMORtissement DEGRessif Comptabilite
cost The value of the asset.
purchase_date The date the asset was purchased.
first_period The end of the first period.
salvage Asset value at maturity.
period The length of accounting periods.
rate rate of depreciation as a percentage.
basis is the type of day counting system you want to use:
0 US 30/360
1 actual days/actual days
2 actual days/360
3 actual days/365
4 European 30/360
If basis is omitted, US 30/360 is applied.
If basis is not in between 0 and 4, #NUM! error is returned.
AMORLINC —
AMORLINC(cost,purchase_date,first_period,salvage,period,rate[,basis])
AMORLINC: Calculates depreciation for each accounting period using French accounting conventions. Assets purchased in the middle of a period take prorated depreciation into account.
Named for AMORtissement LINeaire Comptabilite.
cost The value of the asset.
purchase_date The date the asset was purchased.
first_period The end of the first period.
salvage Asset value at maturity.
period The length of accounting periods.
rate rate of depreciation as a percentage.
basis is the type of day counting system you want to use:
0 US 30/360
1 actual days/actual days
2 actual days/360
3 actual days/365
4 European 30/360
If basis is omitted, US 30/360 is applied.
If basis is not in between 0 and 4, #NUM! error is returned.
COUPDAYBS —
COUPDAYBS(settlement,maturity,frequency[,basis,eom])
COUPDAYBS returns the number of days from the beginning of the coupon period to the settlement date.
settlement is the settlement date of the security.
maturity is the maturity date of the security.
frequency is the number of coupon payments per year.
eom = TRUE handles end of month maturity dates special.
Allowed frequencies are: 1 = annual, 2 = semi, 4 = quarterly, 6 = bimonthly, 12 = monthly.
basis is the type of day counting system you want to use:
0 MSRB 30/360 (MSRB Rule G33 (e))
1 actual days/actual days
2 actual days/360
3 actual days/365
4 European 30/360
5 European+ 30/360
(See the gnumeric manual for a detailed description of these bases).
If frequency is invalid, COUPDAYBS returns #NUM! error.
If basis is omitted, MSRB 30/360 is applied.
If basis is invalid, #NUM! error is returned.
COUPDAYS —
COUPDAYS(settlement,maturity,frequency[,basis,eom])
COUPDAYS returns the number of days in the coupon period of the settlement date.
settlement is the settlement date of the security.
maturity is the maturity date of the security.
frequency is the number of coupon payments per year.
eom = TRUE handles end of month maturity dates special.
Allowed frequencies are: 1 = annual, 2 = semi, 4 = quarterly, 6 = bimonthly, 12 = monthly.
basis is the type of day counting system you want to use:
0 MSRB 30/360 (MSRB Rule G33 (e))
1 actual days/actual days
2 actual days/360
3 actual days/365
4 European 30/360
5 European+ 30/360
(See the gnumeric manual for a detailed description of these bases).
If frequency is invalid, COUPDAYS returns #NUM! error.
If basis is omitted, MSRB 30/360 is applied.
If basis is invalid, #NUM! error is returned.
COUPDAYSNC —
COUPDAYSNC(settlement,maturity,frequency[,basis,eom])
COUPDAYSNC returns the number of days from the settlement date to the next coupon date.
settlement is the settlement date of the security.
maturity is the maturity date of the security.
frequency is the number of coupon payments per year.
eom = TRUE handles end of month maturity dates special.
Allowed frequencies are: 1 = annual, 2 = semi, 4 = quarterly, 6 = bimonthly, 12 = monthly.
basis is the type of day counting system you want to use:
0 MSRB 30/360 (MSRB Rule G33 (e))
1 actual days/actual days
2 actual days/360
3 actual days/365
4 European 30/360
5 European+ 30/360
(See the gnumeric manual for a detailed description of these bases).
If frequency is invalid, COUPDAYSNC returns #NUM! error.
If basis is omitted, MSRB 30/360 is applied.
If basis is invalid, #NUM! error is returned.
COUPNCD —
COUPNCD(settlement,maturity,frequency[,basis,eom])
COUPNCD returns the coupon date following settlement.
settlement is the settlement date of the security.
maturity is the maturity date of the security.
frequency is the number of coupon payments per year.
eom = TRUE handles end of month maturity dates special.
Allowed frequencies are: 1 = annual, 2 = semi, 4 = quarterly, 6 = bimonthly, 12 = monthly.
basis is the type of day counting system you want to use:
0 MSRB 30/360 (MSRB Rule G33 (e))
1 actual days/actual days
2 actual days/360
3 actual days/365
4 European 30/360
5 European+ 30/360
(See the gnumeric manual for a detailed description of these bases).
If frequency is invalid, COUPNCD returns #NUM! error.
If basis is omitted, MSRB 30/360 is applied.
If basis is invalid, #NUM! error is returned.
COUPNUM —
COUPNUM(settlement,maturity,frequency[,basis,eom])
COUPNUM returns the numbers of coupons to be paid between the settlement and maturity dates, rounded up.
settlement is the settlement date of the security.
maturity is the maturity date of the security.
frequency is the number of coupon payments per year.
eom = TRUE handles end of month maturity dates special.
Allowed frequencies are: 1 = annual, 2 = semi, 4 = quarterly. 6 = bimonthly, 12 = monthly.
basis is the type of day counting system you want to use:
0 MSRB 30/360 (MSRB Rule G33 (e))
1 actual days/actual days
2 actual days/360
3 actual days/365
4 European 30/360
5 European+ 30/360
If frequency is other than 1, 2, 4, 6 or 12, COUPNUM returns #NUM! error.
If basis is omitted, MSRB 30/360 is applied.
If basis is not in between 0 and 5, #NUM! error is returned.
COUPPCD —
COUPPCD(settlement,maturity,frequency[,basis,eom])
COUPPCD returns the coupon date preceding settlement.
settlement is the settlement date of the security.
maturity is the maturity date of the security.
frequency is the number of coupon payments per year.
eom = TRUE handles end of month maturity dates special.
Allowed frequencies are: 1 = annual, 2 = semi, 4 = quarterly, 6 = bimonthly, 12 = monthly.
basis is the type of day counting system you want to use:
0 MSRB 30/360 (MSRB Rule G33 (e))
1 actual days/actual days
2 actual days/360
3 actual days/365
4 European 30/360
5 European+ 30/360
(See the gnumeric manual for a detailed description of these bases).
If frequency is invalid, COUPPCD returns #NUM! error.
If basis is omitted, MSRB 30/360 is applied.
If basis is invalid, #NUM! error is returned.
CUM_BIV_NORM_DIST —
CUM_BIV_NORM_DIST(a,b,rho)
CUMIPMT —
CUMIPMT(rate,nper,pv,start_period,end_period,type)
CUMIPMT returns the cumulative interest paid on a loan between start_period and end_period.
If rate <= 0, CUMIPMT returns #NUM! error.
If nper <= 0, CUMIPMT returns #NUM! error.
If pv <= 0, CUMIPMT returns #NUM! error.
If start_period < 1, CUMIPMT returns #NUM! error.
If end_period < start_period, CUMIPMT returns #NUM! error.
If end_period > nper, CUMIPMT returns #NUM! error.
If type <> 0 and type <> 1, CUMIPMT returns #NUM! error.
CUMPRINC —
CUMPRINC(rate,nper,pv,start_period,end_period,type)
CUMPRINC returns the cumulative principal paid on a loan between start_period and end_period.
If rate <= 0, CUMPRINC returns #NUM! error.
If nper <= 0, CUMPRINC returns #NUM! error.
If pv <= 0, CUMPRINC returns #NUM! error.
If start_period < 1, CUMPRINC returns #NUM! error.
If end_period < start_period, CUMPRINC returns #NUM! error.
If end_period > nper, CUMPRINC returns #NUM! error.
If type <> 0 and type <> 1, CUMPRINC returns #NUM! error.
DB —
DB(cost,salvage,life,period[,month])
DB calculates the depreciation of an asset for a given period using the fixed-declining balance method. cost is the initial value of the asset. salvage is the value after the depreciation.
life is the number of periods overall. period is the period for which you want the depreciation to be calculated. month is the number of months in the first year of depreciation.
If month is omitted, it is assumed to be 12.
If cost = 0, DB returns #NUM! error.
If life <= 0, DB returns #NUM! error.
If salvage / cost < 0, DB returns #NUM! error.
DDB —
DDB(cost,salvage,life,period[,factor])
DDB returns the depreciation of an asset for a given period using the double-declining balance method or some other similar method you specify.
cost is the initial value of the asset, salvage is the value after the last period, life is the number of periods, period is the period for which you want the depreciation to be calculated, and factor is the factor at which the balance declines.
If factor is omitted, it is assumed to be two (double-declining balance method).
If life <= 0, DDB returns #NUM! error.
DISC —
DISC(settlement,maturity,par,redemption[,basis])
DISC calculates and returns the discount rate for a security. settlement is the settlement date of the security.
maturity is the maturity date of the security. par is the price per $100 face value of the security. redemption is the redeption value per $100 face value of the security.
basis is the type of day counting system you want to use:
0 US 30/360
1 actual days/actual days
2 actual days/360
3 actual days/365
4 European 30/360
If settlement date or maturity date is not valid, DISC returns #NUM! error.
If basis is omitted, US 30/360 is applied.
If basis < 0 or basis > 4, DISC returns #NUM! error.
If settlement date is after maturity date or they are the same, DISC returns #NUM! error.
DOLLARDE —
DOLLARDE(fractional_dollar,fraction)
DOLLARDE converts a dollar price expressed as a fraction into a dollar price expressed as a decimal number.
fractional_dollar is the fractional number to be converted. fraction is the denominator of the fraction.
If fraction is non-integer it is truncated.
If fraction <= 0, DOLLARDE returns #NUM! error.
DOLLARFR —
DOLLARFR(decimal_dollar,fraction)
DURATION —
DURATION(settlement,maturity,coup,yield,frequency[,basis])
DURATION calculates the duration of a security.
settlement is the settlement date of the security.
maturity is the maturity date of the security.
coup The annual coupon rate as a percentage.
yield The annualized yield of the security as a percentage.
frequency is the number of coupon payments per year. Allowed frequencies are: 1 = annual, 2 = semi, 4 = quarterly. basis is the type of day counting system you want to use:
0 US 30/360
1 actual days/actual days
2 actual days/360
3 actual days/365
4 European 30/360
If frequency is other than 1, 2, or 4, DURATION returns #NUM! error.
If basis is omitted, US 30/360 is applied.
If basis is not in between 0 and 4, #NUM! error is returned.
EFFECT —
EFFECT(r,nper)
EFFECT calculates the effective interest rate from a given nominal rate.
Effective interest rate is calculated using this formula:
(1 + r / nper) ^ nper - 1
where:
r = nominal interest rate (stated in yearly terms)
nper = number of periods used for compounding
If rate < 0, EFFECT returns #NUM! error.
If nper <= 0, EFFECT returns #NUM! error.
For example credit cards will list an APR (annual percentage rate) which is a nominal interest rate.
For example if you wanted to find out how much you are actually paying interest on your credit card that states an APR of 19% that is compounded monthly you would type in:
=EFFECT(.19,12) and you would get .2075 or 20.75%. That is the effective percentage you will pay on your loan.
EURO —
EURO(currency)
EURO converts one Euro to a given national currency in the European monetary union.
currency is one of the following:
ATS (Austria)
BEF (Belgium)
DEM (Germany)
ESP (Spain)
EUR (Euro)
FIM (Finland)
FRF (France)
GRD (Greek)
IEP (Ireland)
ITL (Italy)
LUF (Luxembourg)
NLG (Netherlands)
PTE (Portugal)
If the given currency is other than one of the above, EURO returns #NUM! error.
EUROCONVERT —
EUROCONVERT(n,source,target)
EUROCONVERT converts the currency value n of source currency to a target currency target. Both currencies are given as three-letter strings using the ISO code system names. The following currencies are available:
ATS (Austria)
BEF (Belgium)
DEM (Germany)
ESP (Spain)
EUR (Euro)
FIM (Finland)
FRF (France)
GRD (Greek)
IEP (Ireland)
ITL (Italy)
LUF (Luxembourg)
NLG (Netherlands)
PTE (Portugal)
If the given source or target is other than one of the above, EUROCONVERT returns #VALUE! error.
FV —
FV(rate,nper,pmt[,pv,type])
FV computes the future value of an investment. This is based on periodic, constant payments and a constant interest rate. The interest rate per period is rate, nper is the number of periods in an annuity, pmt is the payment made each period, pv is the present value and type is when the payment is made.
If type = 1 then the payment is made at the beginning of the period.
If type = 0 it is made at the end of each period.
FVSCHEDULE —
FVSCHEDULE(principal,schedule)
FVSCHEDULE returns the future value of given initial value after applying a series of compound periodic interest rates. The argument principal is the present value; schedule is an array of interest rates to apply. The schedule argument must be a range of cells.
G_DURATION —
G_DURATION(rate,pv,fv)
G_DURATION calculates number of periods needed for an investment to attain a desired value. This function is similar to FV and PV with a difference that we do not need give the direction of cash flows e.g. -100 for a cash outflow and +100 for a cash inflow.
If rate <= 0, G_DURATION returns #DIV0 error.
If fv = 0 or pv = 0, G_DURATION returns #DIV0 error.
If fv / pv < 0, G_DURATION returns #VALUE error.
INTRATE —
INTRATE(settlement,maturity,investment,redemption[,basis])
INTRATE calculates and returns the interest rate of a fully vested security.
settlement is the settlement date of the security. maturity is the maturity date of the security. investment is the prize of the security paid at settlement date and redemption is the amount to be received at maturity date.
basis is the type of day counting system you want to use:
0 US 30/360
1 actual days/actual days
2 actual days/360
3 actual days/365
4 European 30/360
If settlement date or maturity date is not valid, INTRATE returns #NUM! error.
If basis is omitted, US 30/360 is applied.
If basis < 0 or basis > 4, INTRATE returns #NUM! error.
If settlement date is after maturity date or they are the same, INTRATE returns #NUM! error.
IPMT —
IPMT(rate,per,nper,pv[,fv,type])
IPMT calculates the amount of a payment of an annuity going towards interest.
Formula for IPMT is:
IPMT(PER) = -PRINCIPAL(PER-1) * INTEREST_RATE
where:
PRINCIPAL(PER-1) = amount of the remaining principal from last period
If fv is omitted, it is assumed to be 0.
If type is omitted, it is assumed to be 0.
IRR —
IRR(values[,guess])
IRR calculates and returns the internal rate of return of an investment. This function is closely related to the net present value function (NPV). The IRR is the interest rate for a series of cash flows where the net preset value is zero.
values contains the series of cash flows generated by the investment. The payments should occur at regular intervals. The optional guess is the initial value used in calculating the IRR. You do not have to use that, it is only provided for the Excel compatibility.
This function is Excel compatible.
ISPMT —
ISPMT(rate,per,nper,pv)
MDURATION —
MDURATION(settlement,maturity,coupon,yield,frequency[,basis])
MDURATION returns the Macauley duration for a security with par value 100.
basis is the type of day counting system you want to use:
0 MSRB 30/360 (MSRB Rule G33 (e))
1 actual days/actual days
2 actual days/360
3 actual days/365
4 European 30/360
5 European+ 30/360
If settlement or maturity are not valid dates, MDURATION returns #NUM! error.
If frequency is other than 1, 2, or 4, MDURATION returns #NUM! error.
If basis is omitted, MSRB 30/360 is applied.
If basis is not in between 0 and 4, #NUM! error is returned.
MIRR —
MIRR(values,finance_rate,reinvest_rate)
NOMINAL —
NOMINAL(r,nper)
NOMINAL calculates the nominal interest rate from a given effective rate.
Nominal interest rate is given by a formula:
nper * (( 1 + r ) ^ (1 / nper) - 1 )
where:
r = effective interest rate
nper = number of periods used for compounding
If rate < 0, NOMINAL returns #NUM! error.
If nper <= 0, NOMINAL returns #NUM! error.
NPER —
NPER(rate,pmt,pv[,fv,type])
NPER calculates number of periods of an investment based on periodic constant payments and a constant interest rate.
The interest rate per period is rate, pmt is the payment made each period, pv is the present value, fv is the future value and type is when the payments are due. If type = 1, payments are due at the beginning of the period, if type = 0, payments are due at the end of the period.
If rate <= 0, NPER returns #DIV0 error.
For example, if you deposit $10,000 in a savings account that earns an interest rate of 6%. To calculate home many years it will take to double your investment use NPER as follows:
=NPER(0.06, 0, -10000, 20000,0)returns 11.895661046 which indicates that you can double your money just before the end of the 12th year.
NPV —
NPV(rate,v1,v2,...)
ODDFPRICE —
ODDFPRICE(settlement,maturity,issue,first_coupon,rate,yld,redemption,frequency[,basis])
ODDFPRICE returns the price per $100 face value of a security. The security should have an odd short or long first period.
settlement is the settlement date of the security. maturity is the maturity date of the security. issue is the issue date of the security. frequency is the number of coupon payments per year. Allowed frequencies are: 1 = annual, 2 = semi, 4 = quarterly. basis is the type of day counting system you want to use:
0 US 30/360
1 actual days/actual days
2 actual days/360
3 actual days/365
4 European 30/360
If frequency is other than 1, 2, or 4, ODDFPRICE returns #NUM! error.
If basis is omitted, US 30/360 is applied.
If basis is not in between 0 and 4, #NUM! error is returned.
ODDFYIELD —
ODDFYIELD(settlement,maturity,issue,first_coupon,rate,pr,redemption,frequency[,basis])
ODDFYIELD calculates the yield of a security having an odd first period.
settlement is the settlement date of the security. maturity is the maturity date of the security. frequency is the number of coupon payments per year. Allowed frequencies are: 1 = annual, 2 = semi, 4 = quarterly. basis is the type of day counting system you want to use:
0 US 30/360
1 actual days/actual days
2 actual days/360
3 actual days/365
4 European 30/360
If frequency is other than 1, 2, or 4, ODDFYIELD returns #NUM! error.
If basis is omitted, US 30/360 is applied.
If basis is not in between 0 and 4, #NUM! error is returned.
ODDLPRICE —
ODDLPRICE(settlement,maturity,last_interest,rate,yld,redemption,frequency[,basis])
ODDLPRICE calculates the price per $100 face value of a security that has an odd last coupon period.
settlement is the settlement date of the security. maturity is the maturity date of the security. frequency is the number of coupon payments per year. Allowed frequencies are: 1 = annual, 2 = semi, 4 = quarterly. basis is the type of day counting system you want to use:
0 US 30/360
1 actual days/actual days
2 actual days/360
3 actual days/365
4 European 30/360
If frequency is other than 1, 2, or 4, ODDLPRICE returns #NUM! error.
If basis is omitted, US 30/360 is applied.
If basis is not in between 0 and 4, #NUM! error is returned.
ODDLYIELD —
ODDLYIELD(settlement,maturity,last_interest,rate,pr,redemption,frequency[,basis])
ODDLYIELD calculates the yield of a security having an odd last period.
settlement is the settlement date of the security. maturity is the maturity date of the security. frequency is the number of coupon payments per year. Allowed frequencies are: 1 = annual, 2 = semi, 4 = quarterly. basis is the type of day counting system you want to use:
0 US 30/360
1 actual days/actual days
2 actual days/360
3 actual days/365
4 European 30/360
If frequency is other than 1, 2, or 4, ODDLYIELD returns #NUM! error.
If basis is omitted, US 30/360 is applied.
If basis is not in between 0 and 4, #NUM! error is returned.
OPT_BAW_AMER —
OPT_BAW_AMER(call_put_flag,spot,strike,time,rate,cost_of_carry,volatility)
OPT_BAW_AMER models the theoretical price of an option according to the Barone Adesie & Whaley approximation.
call_put_flag is c or p to indicate whether the option is a call or a put
spot is the spot price of the underlying asset
strike is the strike price at which the option is struck
time is the number of days to maturity of the option
rate is the risk annualised free rate of interest
cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield
volatility is the annualised volatility in price of the underlying
OPT_BJERSTENS —
OPT_BJERSTENS(call_put_flag,spot,strike,time,rate,volatility[,cost_of_carry])
OPT_BJERSTENS models the theoretical price of american options according to the Bjerksund & Stensland approximation technique.
call_put_flag is c or p to indicate whether the option is a call or a put
spot is the spot price of the underlying asset
strike is the strike price at which the option is struck
time is the number of days to maturity of the option
rate is the risk annualised free rate of interest
volatility is the annualised volatility in price of the underlying
cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield.
OPT_BS —
OPT_BS(call_put_flag,spot,strike,time,rate,volatility [,cost_of_carry])
OPT_BS uses the Black-Scholes model to calculate the price of a European option using call_put_flag, call_put_flag, c or p struck at strike on an asset with spot price spot.
time is the time to maturity of the option expressed in years
rate is the risk-free interest rate
volatility is the annualized volatility, in percent, of the asset or the period through to the exercise date.
cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield
The returned value will be expressed in the same units as strike and spot.
OPT_BS_CARRYCOST —
OPT_BS_CARRYCOST(call_put_flag,spot,strike,time,rate,volatility[,cost_of_carry])
OPT_BS_CARRYCOST uses the Black-Scholes model to calculate the "elasticity" of a European option struck at strike on an asset with spot price spot.
call_put_flag is c or p to indicate whether the option is a call or a put
(The elasticity of an option is the rate of change of its price with respect to its cost of carry.)
volatility is the annualized volatility, in percent, of the asset for the period through to the exercise date. time is the time to maturity of the option expressed in years
rate is the risk-free interest rate to the exercise date, in percent.
cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield.
The returned value will be expressed as the rate of change of option value, per 100% volatility.
OPT_BS_DELTA —
OPT_BS_DELTA(call_put_flag,spot,strike,time,rate,volatility[,cost_of_carry])
OPT_BS_DELTA uses the Black-Scholes model to calculate the "delta" of a European option with call_put_flag, call_put_flag, c or p struck at strike on an asset with spot price spot.
Where time is the time to maturity of the option expressed in years
rate is the risk-free interest rate
volatility is the annualized volatility, in percent, of the asset or the period through to the exercise date.
cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield
The returned value will be expressed in the same units as strike and spot.
OPT_BS_GAMMA —
OPT_BS_GAMMA(spot,strike,time,rate,volatility[,cost_of_carry])
OPT_BS_GAMMA uses the Black-Scholes model to calculate the "gamma" of a European option struck at strike on an asset with spot price spot.
(The gamma of an option is the second derivative of its price with respect to the price of the underlying asset, and is the same for calls and puts.)
time is the time to maturity of the option expressed in years
rate is the risk-free interest rate to the exercise date, in percent.
volatility is the annualized volatility, in percent, of the asset for the period through to the exercise date.
cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield
The returned value will be expressed as the rate of change of delta per unit change in spot.
OPT_BS_RHO —
OPT_BS_RHO(call_put_flag,spot,strike,time,rate,volatility[,cost_of_carry])
OPT_BS_RHO uses the Black-Scholes model to calculate the "rho" of a European option with call_put_flag, call_put_flag struck at strike on an asset with spot price spot.
call_put_flag is c or p to indicate whether the option is a call or a put.
(The rho of an option is the rate of change of its price with respect to the risk free interest rate.)
time is the time to maturity of the option expressed in years
rate is the risk-free interest rate to the exercise date, in percent.
cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield
The returned value will be expressed as the rate of change of option value, per 100% change in rate.
OPT_BS_THETA —
OPT_BS_THETA(call_put_flag,spot,strike,time,rate,volatility[,cost_of_carry])
OPT_BS_THETA uses the Black-Scholes model to calculate the "theta" of a European option with call_put_flag, call_put_flag struck at strike on an asset with spot price spot.
(The theta of an option is the rate of change of its price with respect to time to expiry.)
time is the time to maturity of the option expressed in years
and rate is the risk-free interest rate to the exercise date, in percent.
volatility is the annualized volatility, in percent, of the asset for the period through to the exercise date.
cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield
The returned value will be expressed as minus the rate of change of option value, per 365.25 days.
OPT_BS_VEGA —
OPT_BS_VEGA(spot,strike,time,rate,volatility[,cost_of_carry])
OPT_BS_VEGA uses the Black-Scholes model to calculate the "vega" of a European option struck at strike on an asset with spot price spot.
(The vega of an option is the rate of change of its price with respect to volatility, and is the same for calls and puts.)
volatility is the annualized volatility, in percent, of the asset for the period through to the exercise date.
time is the time to maturity of the option expressed in years
rate is the risk-free interest rate to the exercise date, in percent.
cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield.
The returned value will be expressed as the rate of change of option value, per 100% volatility.
OPT_COMPLEX_CHOOSER —
OPT_COMPLEX_CHOOSER(call_put_flag,spot,strike_call,strike_put,time,time_call,time_put,rate,cost_of_carry,volatility)
OPT_COMPLEX_CHOOSER models the theoretical price of complex chooser options.
call_put_flag is c or p to indicate whether the option is a call or a put
spot is the spot price of the underlying asset
strike_call is the strike price at which the option is struck
strike_put is the strike price at which the option is struck
time is the time in years until the holder chooses a put or a call option
time_call is the time in years to maturity of the call option if chosen
time_put is the time in years to maturity of the put option if chosen
rate is the risk annualised free rate of interest
cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield
volatility is the annualised volatility in price of the underlying
OPT_EXEC —
OPT_EXEC(call_put_flag,spot,strike,time,rate,volatility,cost_of_carry,lambda)
OPT_EXEC models the theoretical price of executive stock options call_put_flag is c or p to indicate whether the option is a call or a put
One would expect this to always be a call option
spot is the spot price of the underlying asset
strike is the strike price at which the option is struck
time is the number of days to maturity of the option
rate is the risk annualised free rate of interest
volatility is the annualised volatility in price of the underlying
cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield
lambda is the jump rate for executives. The model assumes executives forfeit their options if they leave the company.
OPT_EXTENDIBLE_WRITER —
OPT_EXTENDIBLE_WRITER(call_put_flag,spot,strike1,strike2,time1,time2,rate,cost_of_carry,volatility)
OPT_EXTENDIBLE_WRITER models the theoretical price of extendible writer options. These are options that can be exercised at an initial period, time1, or their maturity extended to time2 if the option is out of the money at time1
call_put_flag is c or p to indicate whether the option is a call or a put
spot is the spot price of the underlying asset.
strike1 is the strike price at which the option is struck.
strike2 is the strike price at which the option is struck.
time1 is the initial maturity of the option in years.
time2 is the is the extended maturity in years if chosen.
rate is the risk annualised free rate of interest.
cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield.
volatility is the annualised volatility in price of the underlying.
OPT_FORWARD_START —
OPT_FORWARD_START(call_put_flag,spot,alpha,time1,time,rate,volatility,cost_of_carry)
OPT_FORWARD_START models the theoretical price of forward start options
call_put_flag is c or p to indicate whether the option is a call or a put
spot is the spot price of the underlying asset
alpha is a fraction that set the strike price the future date time1
time1 is the number of days until the option starts
time is the number of days to maturity of the option
rate is the risk annualised free rate of interest
volatility is the annualised volatility in price of the underlying
cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield
OPT_FRENCH —
OPT_FRENCH(call_put_flag,spot,strike,time,t2,rate,volatility[,cost_of_carry])
OPT_FRENCH values the theoretical price of a European option adjusted for trading day volatility, struck at strike on an asset with spot price spot.
call_put_flag is 'c' or 'p' to indicate whether the option is a call or a put.
volatility is the annualized volatility, in percent, of the asset for the period through to the exercise date.
time the number of calendar days to exercise divided by calendar days in the year.
t2 is the number of trading days to exercise divided by trading days in the year.
rate is the risk-free interest rate.
cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield to the exercise date, in percent.
The returned value will be expressed as the rate of change of option value, per 100% volatility.
OPT_GARMAN_KOHLHAGEN —
OPT_GARMAN_KOHLHAGEN(call_put_flag,spot,strike,time,domestic_rate,foreign_rate,volatility[,cost_of_carry])
OPT_GARMAN_KOHLHAGEN values the theoretical price of a European currency option struck at strike on an asset with spot price spot.
call_put_flag is c or p to indicate whether the option is a call or a put
volatility is the annualized volatility, in percent, of the asset for the period through to the exercise date.
time the number of days to exercise
domestic_rate is the domestic risk-free interest rate to the exercise date
foreign_rate is the foreign risk-free interest rate to the exercise date, in percent.
cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield
The returned value will be expressed as the rate of change of option value, per 100% volatility.
OPT_JUMP_DIFF —
OPT_JUMP_DIFF(call_put_flag,spot,strike,time,rate,volatility,lambda,gamma)
OPT_JUMP_DIFF models the theoretical price of an option according to the Jump Diffusion process (Merton).
call_put_flag is c or p to indicate whether the option is a call or a put
spot is the spot price of the underlying
strike is the strike price of the option
time is the time to maturity of the option expressed in years
rate is the annualised rate of interest
volatility is the annualized volatility of the underlying asset
lambda is expected number of 'jumps' per year
gamma is proportion of volatility explained by the 'jumps'
OPT_MILTERSEN_SCHWARTZ —
OPT_MILTERSEN_SCHWARTZ(call_put_flag,p_t,f_t,x,t1,t2,v_s,v_e,v_f,rho_se,rho_sf,rho_ef,kappa_e,kappa_f)
OPT_MILTERSEN_SCHWARTZ models the theoretical price of options on commodities futures according to Miltersen & Schwartz.
call_put_flag is c or p to indicate whether the option is a call or a put
p_t is a zero coupon bond with expiry at option maturity
f_t is is the futures price
x is is the strike price
t1 is the time to maturity of the option
t2 is the time to maturity of the underlying commodity futures contract
v_s is the volatility of the spot commodity price
v_e is the volatility of the future convenience yield
v_f is the volatility of the forward rate of interest
rho_se is correlation between the spot commodity price and the convenience yield
rho_sf is correlation between the spot commodity price and the forward interest rate
rho_ef is correlation between the forward interest rate and the convenience yield
kappa_e is the speed of mean reversion of the convenience yield
kappa_f is the speed of mean reversion of the forward interest rate
OPT_ON_OPTIONS —
OPT_ON_OPTIONS(type_flag,spot,strike1,strike2,time1,time2,rate,cost_of_carry,volatility)
OPT_ON_OPTIONS models the theoretical price of options on options
type_flag is 'cc' for calls on calls, 'cp' for calls on puts, and so on for 'pc', and 'pp'
spot is the spot price of the underlying asset.
strike1 is the strike price at which the option is struck.
strike2 is the strike price at which the option is struck.
time1 is the time in years to maturity of the option.
time2 is the time in years to the maturity of the underlying option.
(time2 >= time1)
rate is the risk annualised free rate of interest
cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield
volatility is the annualised volatility in price of the underlying
OPT_RGW —
OPT_RGW(call_put_flag,spot,strike,t1,t2,rate,d,volatility)
OPT_RGW models the theoretical price of an american option according to the Roll-Geske-Whaley approximation where:
call_put_flag is c or p to indicate whether the option is a call or a put
spot is the spot price of the underlying asset
strike is the strike price at which the option is struck
t1 is the time to the dividend payout
t2 is the time to option expiration.
rate is the annualised rate of interest
d is the amount of the dividend to be paid
volatility is the annualized rate of volatility of the underlying asset
OPT_SIMPLE_CHOOSER —
OPT_SIMPLE_CHOOSER(call_put_flag,spot,strike,time1,time2,rate,cost_of_carry,volatility)
OPT_SIMPLE_CHOOSER models the theoretical price of simple chooser options.
call_put_flag is c or p to indicate whether the option is a call or a put
spot is the spot price of the underlying asset
strike is the strike price at which the option is struck
time1 is the time in years until the holder chooses a put or a call option
time2 is the time in years until the the chosen option expires
rate is the risk annualised free rate of interest
cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield
OPT_TIME_SWITCH —
OPT_TIME_SWITCH(call_put_flag,spot,strike,a,time,m,dt,rate,cost_of_carry,volatility)
OPT_TIME_SWITCH models the theoretical price of time switch options. (Pechtl 1995)
The holder receives a * dt for each period dt that the asset price was greater than the strike price (for a call) or below it (for a put)
call_put_flag is c or p to indicate whether the option is a call or a put
spot is the spot price of the underlying asset
strike is the strike price at which the option is struck
a is the amount received for each time period as discussed above
time is the maturity of the option in years
m is the number of time units the option has already met the condition
dt is the agreed upon discrete time period (often a day) expressed as a fraction of a year
rate is the risk annualised free rate of interest
cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield
PMT —
PMT(rate,nper,pv[,fv,type])
PMT returns the amount of payment for a loan based on a constant interest rate and constant payments (each payment is equal amount).
rate is the constant interest rate.
nper is the overall number of payments.
pv is the present value.
fv is the future value.
type is the type of the payment: 0 means at the end of the period and 1 means at the beginning of the period.
If fv is omitted, Gnumeric assumes it to be zero.
If type is omitted, Gnumeric assumes it to be zero.
PPMT —
PPMT(rate,per,nper,pv[,fv,type])
PPMT calculates the amount of a payment of an annuity going towards principal.
Formula for it is:
PPMT(per) = PMT - IPMT(per)
where:
PMT = Payment received on annuity
IPMT(per) = amount of interest for period per
If fv is omitted, it is assumed to be 0.
If type is omitted, it is assumed to be 0.
PRICE —
PRICE(settle,mat,rate,yield,redemption_price,[frequency,basis])
PRICE returns price per $100 face value of a security. This method can only be used if the security pays periodic interest.
frequency is the number of coupon payments per year. Allowed frequencies are: 1 = annual, 2 = semi, 4 = quarterly. basis is the type of day counting system you want to use:
0 US 30/360
1 actual days/actual days
2 actual days/360
3 actual days/365
4 European 30/360
If frequency is other than 1, 2, or 4, PRICE returns #NUM! error.
If basis is omitted, US 30/360 is applied.
If basis is not in between 0 and 4, #NUM! error is returned.
PRICEDISC —
PRICEDISC(settlement,maturity,discount,redemption[,basis])
PRICEDISC calculates and returns the price per $100 face value of a security bond. The security does not pay interest at maturity.
settlement is the settlement date of the security. maturity is the maturity date of the security. discount is the rate for which the security is discounted. redemption is the amount to be received on maturity date.
basis is the type of day counting system you want to use:
0 US 30/360
1 actual days/actual days
2 actual days/360
3 actual days/365
4 European 30/360
If settlement date or maturity date is not valid, PRICEDISC returns #NUM! error.
If basis is omitted, US 30/360 is applied.
If basis < 0 or basis > 4, PRICEDISC returns #NUM! error.
If settlement date is after maturity date or they are the same, PRICEDISC returns #NUM! error.
PRICEMAT —
PRICEMAT(settlement,maturity,issue,rate,yield[,basis])
PRICEMAT calculates and returns the price per $100 face value of a security. The security pays interest at maturity.
settlement is the settlement date of the security. maturity is the maturity date of the security. issue is the issue date of the security. rate is the discount rate of the security. yield is the annual yield of the security. basis is the type of day counting system you want to use:
0 US 30/360
1 actual days/actual days
2 actual days/360
3 actual days/365
4 European 30/360
If settlement date or maturity date is not valid, PRICEMAT returns #NUM! error.
If basis is omitted, US 30/360 is applied.
If basis < 0 or basis > 4, PRICEMAT returns #NUM! error.
If settlement date is after maturity date or they are the same, PRICEMAT returns #NUM! error.
PV —
PV(rate,nper,pmt[,fv,type])
PV calculates the present value of an investment. rate is the periodic interest rate, nper is the number of periods used for compounding. pmt is the payment made each period, fv is the future value and type is when the payment is made.
If type = 1 then the payment is made at the beginning of the period.
If type = 0 (or omitted) it is made at the end of each period.
RATE —
RATE(nper,pmt,pv[,fv,type,guess])
RECEIVED —
RECEIVED(settlement,maturity,investment,rate[,basis])
RECEIVED calculates and returns the amount to be received at maturity date for a security bond.
settlement is the settlement date of the security. maturity is the maturity date of the security. The amount of investment is specified in investment. rate is the security's discount rate.
basis is the type of day counting system you want to use:
0 US 30/360
1 actual days/actual days
2 actual days/360
3 actual days/365
4 European 30/360
If settlement date or maturity date is not valid, RECEIVED returns #NUM! error.
If basis is omitted, US 30/360 is applied.
If basis < 0 or basis > 4, RECEIVED returns #NUM! error.
If settlement date is after maturity date or they are the same, RECEIVED returns #NUM! error.
SLN —
SLN(cost,salvage_value,life)
SLN function will determine the straight line depreciation of an asset for a single period.
The formula is:
Depreciation expense = ( cost - salvage_value ) / life
cost is the cost of an asset when acquired (market value).
salvage_value is the amount you get when asset is sold at the end of the asset's useful life.
life is the anticipated life of an asset.
If life <= 0, SLN returns #NUM! error.
SYD —
SYD(cost,salvage_value,life,period)
SYD function calculates the sum-of-years digits depreciation for an asset based on its cost, salvage value, anticipated life and a particular period. This method accelerates the rate of the depreciation, so that more depreciation expense occurs in earlier periods than in later ones. The depreciable cost is the actual cost minus the salvage value. The useful life is the number of periods (typically years) over with the asset is depreciated.
The Formula used for sum-of-years digits depreciation is:
Depreciation expense =
( cost - salvage_value ) * (life - period + 1) * 2 / life * (life + 1).
cost is the cost of an asset when acquired (market value).
salvage_value is the amount you get when asset sold at the end of its useful life.
life is the anticipated life of an asset.
period is the period for which we need the expense.
If life <= 0, SYD returns #NUM! error.
TBILLEQ —
TBILLEQ(settlement,maturity,discount)
TBILLEQ function returns the bond-yield equivalent (BEY) for a treasury bill. TBILLEQ is equivalent to
(365 * discount) / (360 - discount * DSM),
where DSM is the days between settlement and maturity.
If settlement is after maturity or the maturity is set to over one year later than the settlement, TBILLEQ returns #NUM! error.
If discount is negative, TBILLEQ returns #NUM! error.
TBILLPRICE —
TBILLPRICE(settlement,maturity,discount)
TBILLPRICE function returns the price per $100 value for a treasury bill where settlement is the settlement date and maturity is the maturity date of the bill. discount is the treasury bill's discount rate.
If settlement is after maturity or the maturity is set to over one year later than the settlement, TBILLPRICE returns #NUM! error.
If discount is negative, TBILLPRICE returns #NUM! error.
TBILLYIELD —
TBILLYIELD(settlement,maturity,pr)
TBILLYIELD function returns the yield for a treasury bill. settlement is the settlement date and maturity is the maturity date of the bill. discount is the treasury bill's discount rate.
If settlement is after maturity or the maturity is set to over one year later than the settlement, TBILLYIELD returns #NUM! error.
If pr is negative, TBILLYIELD returns #NUM! error.
VDB —
VDB(cost,salvage,life,start_period,end_period[,factor,switch])
VDB calculates the depreciation of an asset for a given period or partial period using the double-declining balance method.
If start_period < 0, VDB returns #NUM! error.
If start_period > end_period, VDB returns #NUM! error.
If end_period > life, VDB returns #NUM! error.
If cost < 0, VDB returns #NUM! error.
If salvage > cost, VDB returns #NUM! error.
If factor <= 0, VDB returns #NUM! error.
XIRR —
XIRR(values,dates[,guess])
XIRR calculates and returns the internal rate of return of an investment that has not necessarily periodic payments. This function is closely related to the net present value function (NPV and XNPV). The XIRR is the interest rate for a series of cash flows where the XNPV is zero.
values contains the series of cash flows generated by the investment. dates contains the dates of the payments. The first date describes the payment day of the initial payment and thus all the other dates should be after this date. The optional guess is the initial value used in calculating the XIRR. You do not have to use that, it is only provided for the Excel compatibility.
This function is Excel compatible.
XNPV —
XNPV(rate,values,dates)
XNPV calculates the net present value of an investment. The schedule of the cash flows is given in dates array. The first date indicates the beginning of the payment schedule. rate is the interest rate and values are the payments.
If values and dates contain unequal number of values, XNPV returns the #NUM! error.
YIELD —
YIELD(settlement,maturity,rate,price,redemption_price,frequency[,basis])
YIELD returns the yield on a security that pays periodic interest.
frequency is the number of coupon payments per year. Allowed frequencies are: 1 = annual, 2 = semi, 4 = quarterly. basis is the type of day counting system you want to use:
0 US 30/360
1 actual days/actual days
2 actual days/360
3 actual days/365
4 European 30/360
If frequency is other than 1, 2, or 4, YIELD returns #NUM! error.
If basis is omitted, US 30/360 is applied.
If basis is not in between 0 and 4, #NUM! error is returned.
YIELDDISC —
YIELDDISC(settlement,maturity,pr,redemption[,basis])
YIELDDISC calculates the annual yield of a security that is discounted.
settlement is the settlement date of the security. maturity is the maturity date of the security. pr is the price per $100 face value of the security. redemption is the redemption value per $100 face value. basis is the type of day counting system you want to use:
0 US 30/360
1 actual days/actual days
2 actual days/360
3 actual days/365
4 European 30/360
If frequency is other than 1, 2, or 4, YIELDDISC returns #NUM! error.
If basis is omitted, US 30/360 is applied.
If basis is not in between 0 and 4, #NUM! error is returned.
YIELDMAT —
YIELDMAT(settlement,maturity,issue,rate,pr[,basis])
YIELDMAT calculates the annual yield of a security for which the interest is payed at maturity date.
settlement is the settlement date of the security. maturity is the maturity date of the security. issue is the issue date of the security. rate is the interest rate set to the security. pr is the price per $100 face value of the security. basis is the type of day counting system you want to use:
0 US 30/360
1 actual days/actual days
2 actual days/360
3 actual days/365
4 European 30/360
If basis is omitted, US 30/360 is applied.
If basis is not in between 0 and 4, #NUM! error is returned.
CELL —
CELL(type,ref)
CELL returns information about the formatting, location, or contents of a cell.
type specifies the type of information you want to obtain:
address Returns the given cell reference as text.
col Returns the number of the column in ref.
contents Returns the contents of the cell in ref.
format Returns the code of the format of the cell.
parentheses Returns 1 if ref contains a negative value
and its format displays it with parentheses.
row Returns the number of the row in ref.
width Returns the column width.
This function is Excel compatible.
COUNTBLANK —
COUNTBLANK(range)
ERROR.TYPE —
ERROR.TYPE(value)
EXPRESSION —
EXPRESSION(cell)
EXPRESSION returns expression in cell as a string, or empty if the cell is not an expression.
GETENV —
GETENV(string)
INFO —
INFO(type)
INFO returns information about the current operating environment.
type is the type of information you want to obtain:
memavail Returns the amount of memory available, bytes.
memused Returns the amount of memory used (bytes).
numfile Returns the number of active worksheets.
osversion Returns the operating system version.
recalc Returns the recalculation mode (automatic).
release Returns the version of Gnumeric as text.
system Returns the name of the environment.
totmem Returns the amount of total memory available.
This function is Excel compatible, except that types directory and origin are not implemented.
ISERR —
ISERR(value)
ISERROR —
ISERROR(value)
ISLOGICAL —
ISLOGICAL(value)
ISNA —
ISNA(value)
N —
N(value)
AND —
AND(b1, b2, ...)
AND implements the logical AND function: the result is TRUE if all of the expressions evaluate to TRUE, otherwise it returns FALSE.
b1 trough bN are expressions that should evaluate to TRUE or FALSE. If an integer or floating point value is provided, zero is considered FALSE and anything else is TRUE.
If the values contain strings or empty cells those values are ignored.
If no logical values are provided, then the error #VALUE! is returned.
This function is Excel compatible.
IF —
IF(condition[,if-true,if-false])
IF function can be used to evaluate conditionally other expressions. IF evaluates condition. If condition returns a non-zero value the result of the IF expression is the if-true expression, otherwise IF evaluates to the value of if-false.
If omitted if-true defaults to TRUE and if-false to FALSE.
This function is Excel compatible.
NOT —
NOT(number)
OR —
OR(b1, b2, ...)
OR implements the logical OR function: the result is TRUE if any of the values evaluated to TRUE.
b1 trough bN are expressions that should evaluate to TRUE or FALSE. If an integer or floating point value is provided, zero is considered FALSE and anything else is TRUE.
If the values contain strings or empty cells those values are ignored.
If no logical values are provided, then the error #VALUE! is returned.
This function is Excel compatible.
XOR —
XOR(b1, b2, ...)
XOR implements the logical exclusive OR function: the result is TRUE if an odd number of the values evaluated to TRUE.
b1 trough bN are expressions that should evaluate to TRUE or FALSE. If an integer or floating point value is provided, zero is considered FALSE and anything else is TRUE.
If the values contain strings or empty cells those values are ignored.
If no logical values are provided, then the error #VALUE! is returned.
ADDRESS —
ADDRESS(row_num,col_num[,abs_num,a1,text])
ADDRESS returns a cell address as text for specified row and column numbers.
a1 is a logical value that specifies the reference style. If a1 is TRUE or omitted, ADDRESS returns an A1-style reference, i.e. $D$4. Otherwise ADDRESS returns an R1C1-style reference, i.e. R4C4.
text specifies the name of the worksheet to be used as the external reference.
If abs_num is 1 or omitted, ADDRESS returns absolute reference.
If abs_num is 2 ADDRESS returns absolute row and relative column.
If abs_num is 3 ADDRESS returns relative row and absolute column.
If abs_num is 4 ADDRESS returns relative reference.
If abs_num is greater than 4 ADDRESS returns #VALUE! error.
If row_num or col_num is less than one, ADDRESS returns #VALUE! error.
CHOOSE —
CHOOSE(index[,value1][,value2]...)
COLUMN —
COLUMN([reference])
COLUMNNUMBER —
COLUMNNUMBER(name)
COLUMNS —
COLUMNS(reference)
HLOOKUP —
HLOOKUP(value,range,row[,approximate,as_index])
HLOOKUP function finds the col in range that has a first row cell similar to value. If approximate is not true it finds the col with an exact equivalence. If approximate is true, then the values must be sorted in order of ascending value for correct function; in this case it finds the col with value less than value it returns the value in the col found at a 1-based offset in row rows into the range. as_index returns the 0-based offset that matched rather than the value.
HLOOKUP returns #NUM! if row < 0.
HLOOKUP returns #REF! if row falls outside range.
HYPERLINK —
HYPERLINK(link_location[,optional_label])
INDEX —
INDEX(array[,row, col, area])
INDEX gives a reference to a cell in the given array.The cell is pointed out by row and col, which count the rows and columns in the array.
If row and col are omited the are assumed to be 1.
If the reference falls outside the range of the array, INDEX returns a #REF! error.
INDIRECT —
INDIRECT(ref_text[,format])
INDIRECT function returns the contents of the cell pointed to by the ref_text string. The string specifies a single cell reference the format of which is either A1 or R1C1 style. The style is set by the format boolean, which defaults to the A1 style.
If ref_text is not a valid reference returns #REF!
LOOKUP —
LOOKUP(value,vector1[,vector2])
LOOKUP function finds the row index of value in vector1 and returns the contents of vector2 at that row index. Alternatively a single array can be used for vector1. If the area is longer than it is wide then the sense of the search is rotated.
If LOOKUP can't find value it uses the largest value less than value.
The data must be sorted.
If value is smaller than the first value it returns #N/A.
MATCH —
MATCH(seek,vector[,type])
MATCH function finds the row index of seek in vector and returns it.
If the area is longer than it is wide then the sense of the search is rotated. Alternatively a single array can be used.
The type parameter, which defaults to +1, controls the search:
If type = 1, MATCH finds largest value <= seek.
If type = 0, MATCH finds first value == seek.
If type = -1, MATCH finds smallest value >= seek.
For type = 0, the data can be in any order. * For type = -1 and type = +1, the data must be sorted. (And in these cases, MATCH uses a binary search to locate the index.)
If seek could not be found, #N/A is returned.
OFFSET —
OFFSET(range,row,col[,height[,width]])
ROW —
ROW([reference])
ROWS —
ROWS(reference)
VLOOKUP —
VLOOKUP(value,range,column[,approximate,as_index])
VLOOKUP function finds the row in range that has a first column similar to value. If approximate is not true it finds the row with an exact equivalence. If approximate is true, then the values must be sorted in order of ascending value for correct function; in this case it finds the row with value less than value. It returns the value in the row found at a 1-based offset in column columns into the range. as_index returns the 0-based offset that matched rather than the value.
VLOOKUP returns #NUM! if column < 0.
VLOOKUP returns #REF! if column falls outside range.
ABS —
ABS(b1)
ACOS —
ACOS(x)
ACOSH —
ACOSH(x)
ASIN —
ASIN(x)
ASINH —
ASINH(x)
ATAN —
ATAN(x)
ATAN2 —
ATAN2(b1,b2)
ATANH —
ATANH(x)
BETA —
BETA(a,b)
BETALN —
BETALN(a,b)
CEILING —
CEILING(x,significance)
COMBIN —
COMBIN(n,k)
COS —
COS(x)
COSH —
COSH(x)
COUNTIF —
COUNTIF(range,criteria)
COUNTIF function counts the number of cells in the given range that meet the given criteria.
This function is Excel compatible.
DEGREES —
DEGREES(x)
EVEN —
EVEN(number)
EXP —
EXP(x)
FACTDOUBLE —
FACTDOUBLE(number)
FIB —
FIB(number)
FLOOR —
FLOOR(x[,significance])
G_PRODUCT —
G_PRODUCT(value1, value2, ...)
GCD —
GCD(number1,number2,...)
INT —
INT(a)
LCM —
LCM(number1,number2,...)
LCM returns the least common multiple of integers. The least common multiple is the smallest positive number that is a multiple of all integer arguments given.
If any of the arguments is less than one, LCM returns #NUM!.
If any of the arguments is non-integer, it is truncated.
This function is Excel compatible.
LN —
LN(x)
LOG —
LOG(x[,base])
LOG10 —
LOG10(x)
MDETERM —
MDETERM(matrix)
MDETERM function returns the determinant of a given matrix.
If the matrix does not contain equal number of columns and rows, MDETERM returns #VALUE! error.
This function is Excel compatible.
MINVERSE —
MINVERSE(matrix)
MMULT —
MMULT(array1,array2)
MOD —
MOD(number,divisor)
MROUND —
MROUND(number,multiple)
MULTINOMIAL —
MULTINOMIAL(value1, value2, ...)
ODD —
ODD(number)
PI —
PI()
POWER —
POWER(x,y)
PRODUCT —
PRODUCT(value1, value2, ...)
QUOTIENT —
QUOTIENT(numerator,denominator)
RADIANS —
RADIANS(x)
ROMAN —
ROMAN(number[,type])
ROMAN function returns an arabic number in the roman numeral style, as text. number is the number you want to convert and type is the type of roman numeral you want.
If type is 0 or it is omitted, ROMAN returns classic roman numbers.
Type 1 is more concise than classic type, type 2 is more concise than type 1, and type 3 is more concise than type 2. Type 4 is simplified type.
If number is negative or greater than 3999, ROMAN returns #VALUE! error.
This function is Excel compatible.
ROUND —
ROUND(number[,digits])
ROUND function rounds a given number.
number is the number you want rounded and digits is the number of digits to which you want to round that number.
If digits is greater than zero, number is rounded to the given number of digits.
If digits is zero or omitted, number is rounded to the nearest integer.
If digits is less than zero, number is rounded to the left of the decimal point.
This function is Excel compatible.
ROUNDDOWN —
ROUNDDOWN(number[,digits])
ROUNDDOWN function rounds a given number down. number is the number you want rounded down and digits is the number of digits to which you want to round that number.
If digits is greater than zero, number is rounded down to the given number of digits.
If digits is zero or omitted, number is rounded down to the nearest integer.
If digits is less than zero, number is rounded down to the left of the decimal point.
This function is Excel compatible.
ROUNDUP —
ROUNDUP(number[,digits])
ROUNDUP function rounds a given number up.
number is the number you want rounded up and digits is the number of digits to which you want to round that number.
If digits is greater than zero, number is rounded up to the given number of digits.
If digits is zero or omitted, number is rounded up to the nearest integer.
If digits is less than zero, number is rounded up to the left of the decimal point.
This function is Excel compatible.
SERIESSUM —
SERIESSUM(x,n,m,coefficients)
SERIESSUM function returns the sum of a power series. x is the base of the power series, n is the initial power to raise x, m is the increment to the power for each term in the series, and coefficients are the coefficients by which each successive power of x is multiplied.
This function is Excel compatible.
SIGN —
SIGN(number)
SIN —
SIN(x)
SINH —
SINH(x)
SQRT —
SQRT(x)
SQRTPI —
SQRTPI(number)
SUM —
SUM(value1, value2, ...)
SUM computes the sum of all the values and cells referenced in the argument list.
This function is Excel compatible.
SUMA —
SUMA(value1, value2, ...)
SUMA computes the sum of all the values and cells referenced in the argument list. Numbers, text and logical values are included in the calculation too. If the cell contains text or the argument evaluates to FALSE, it is counted as value zero (0). If the argument evaluates to TRUE, it is counted as one (1).
SUMIF —
SUMIF(range,criteria[,actual_range])
SUMIF function sums the values in the given range that meet the given criteria. If actual_range is given, SUMIF sums the values in the actual_range whose corresponding components in range meet the given criteria.
This function is Excel compatible.
SUMPRODUCT —
SUMPRODUCT(range1,range2,...)
SUMPRODUCT function multiplies corresponding data entries in the given arrays or ranges, and then returns the sum of those products. If an array entry is not numeric, the value zero is used instead.
If arrays or range arguments do not have the same dimensions, SUMPRODUCT returns #VALUE! error.
This function is Excel compatible.
SUMSQ —
SUMSQ(value1, value2, ...)
SUMSQ returns the sum of the squares of all the values and cells referenced in the argument list.
This function is Excel compatible.
SUMX2MY2 —
SUMX2MY2(array1,array2)
SUMX2MY2 function returns the sum of the difference of squares of corresponding values in two arrays. array1 is the first array or range of data points and array2 is the second array or range of data points. The equation of SUMX2MY2 is SUM (x^2-y^2).
Strings and empty cells are simply ignored.
If array1 and array2 have different number of data points, SUMX2MY2 returns #N/A error.
This function is Excel compatible.
SUMX2PY2 —
SUMX2PY2(array1,array2)
SUMX2PY2 function returns the sum of the sum of squares of corresponding values in two arrays. array1 is the first array or range of data points and array2 is the second array or range of data points. The equation of SUMX2PY2 is SUM (x^2+y^2).
Strings and empty cells are simply ignored.
If array1 and array2 have different number of data points, SUMX2PY2 returns #N/A error.
This function is Excel compatible.
SUMXMY2 —
SUMXMY2(array1,array2)
SUMXMY2 function returns the sum of squares of differences of corresponding values in two arrays. array1 is the first array or range of data points and array2 is the second array or range of data points. The equation of SUMXMY2 is SUM (x-y)^2.
Strings and empty cells are simply ignored.
If array1 and array2 have different number of data points, SUMXMY2 returns #N/A error.
This function is Excel compatible.
TAN —
TAN(x)
TANH —
TANH(x)
NT_MU —
NT_MU(n)
NT_PHI —
NT_PHI(n)
RANDBERNOULLI —
RANDBERNOULLI(p)
RANDBETWEEN —
RANDBETWEEN(bottom,top)
RANDBINOM —
RANDBINOM(p,trials)
RANDCAUCHY —
RANDCAUCHY(a)
RANDDISCRETE —
RANDDISCRETE(val_range[,prob_range])
RANDDISCRETE returns one of the values in the val_range. The probabilities for each value are given in the prob_range.
If prob_range is omitted, the uniform discrete distribution is assumed.
If the sum of all values in prob_range is other than one, RANDDISCRETE returns #NUM! error.
If val_range and prob_range are not the same size, RANDDISCRETE returns #NUM! error.
If val_range or prob_range is not a range, RANDDISCRETE returns #VALUE! error.
RANDEXPPOW —
RANDEXPPOW(a,b)
RANDEXPPOW returns a random variate from the exponential power distribution with scale parameter a and exponent b. The distribution is,
p(x) dx = {1 over 2 a Gamma(1+1/b)} exp(-|x/a|^b) dx, for x >= 0.
For b = 1 this reduces to the Laplace distribution.
For b = 2 it has the same form as a normal distribution with sigma = a/sqrt(2).
RANDGAMMA —
RANDGAMMA(a,b)
RANDGEOM —
RANDGEOM(p)
RANDGUMBEL —
RANDGUMBEL(a,b[,type])
RANDHYPERG —
RANDHYPERG(n1,n2,t)
RANDLANDAU —
RANDLANDAU()
RANDLANDAU returns a random variate from the Landau distribution. The probability distribution for Landau random variates is defined analytically by the complex integral,
p(x) = (1/(2 pi i)) int_{c-i infty}^{c+i infty} ds exp(s log(s) + x s).
For numerical purposes it is more convenient to use the following equivalent form of the integral,
p(x) = (1/pi) int_0^ infty dt exp(-t log(t) - x t) sin(pi t).
RANDLAPLACE —
RANDLAPLACE(a)
RANDLEVY —
RANDLEVY(c,alpha[,beta])
RANDLEVY returns a Levy-distributed random number. If beta is omitted, it is assumed to be 0.
For alpha = 1, beta=0, we get the Lorentz distribution.
For alpha = 2, beta=0, we get the normal distribution.
If alpha <= 0 or alpha > 2, RANDLEVY returns #NUM! error.
If beta < -1 or beta > 1, RANDLEVY returns #NUM! error.
RANDLOG —
RANDLOG(p)
RANDLOGISTIC —
RANDLOGISTIC(a)
RANDNEGBINOM —
RANDNEGBINOM(p,failures)
RANDNORM —
RANDNORM(mean,stdev)
RANDNORMTAIL —
RANDNORMTAIL(a,sigma)
RANDNORMTAIL returns a random variates from the upper tail of a normal distribution with standard deviation sigma. The values returned are larger than the lower limit a, which must be positive. The method is based on Marsaglia's famous rectangle-wedge-tail algorithm (Ann Math Stat 32, 894-899 (1961)), with this aspect explained in Knuth, v2, 3rd ed, p139, 586 (exercise 11).
The probability distribution for normal tail random variates is,
p(x) dx = {1 over N(a;sigma)} exp (- x^2/(2 sigma^2)) dx,
for x > a where N(a;sigma) is the normalization constant, N(a;sigma) = (1/2) erfc(a / sqrt(2 sigma^2)).
RANDPOISSON —
RANDPOISSON(lambda)
RANDRAYLEIGHTAIL —
RANDRAYLEIGHTAIL(a,sigma)
RANDUNIFORM —
RANDUNIFORM(a,b)
RANDUNIFORM returns a random variate from the uniform (flat) distribution from a to b. The distribution is,
p(x) dx = {1 over (b-a)} dx : for a <= x < b.
p(x) dx = 0 : for x < a or b <= x.
If a > b RANDUNIFORM returns #NUM! error.
SIMTABLE —
SIMTABLE(d1, d2, ..., dN)
SIMTABLE returns one of the values in the given argument list depending on the round number of the simulation tool. When the simulation tool is not activated, SIMTABLE returns d1.
With the simulation tool and the SIMTABLE function you can test given decision variables. Each SIMTABLE function contains the possible values of a simulation variable. In most valid simulation models you should have the same number of values dN for all decision variables. If the simulation is run more rounds than there are values defined, SIMTABLE returns #N/A! error (e.g. if A1 contains `=SIMTABLE(1)' and A2 `=SIMTABLE(1,2)', A1 yields #N/A! error on the second round).
The successive use of the simulation tool also requires that you give to the tool at least one input variable having RAND() or any other RAND<distribution name>() function in it. On each round, the simulation tool iterates for the given number of rounds over all the input variables to reevaluate them. On each iteration, the values of the output variables are stored, and when the round is completed, descriptive statistical information is created according to the values.
AVEDEV —
AVEDEV(n1, n2, ...)
AVEDEV returns the average of the absolute deviations of a data set from their mean.
This function is Excel compatible.
AVERAGE —
AVERAGE(value1, value2,...)
AVERAGE computes the average of all the values and cells referenced in the argument list. This is equivalent to the sum of the arguments divided by the count of the arguments.
This function is Excel compatible.
AVERAGEA —
AVERAGEA(number1,number2,...)
AVERAGEA returns the average of the given arguments. Numbers, text and logical values are included in the calculation too. If the cell contains text or the argument evaluates to FALSE, it is counted as value zero (0). If the argument evaluates to TRUE, it is counted as one (1). Note that empty cells are not counted.
This function is Excel compatible.
BERNOULLI —
BERNOULLI(k,p)
BETADIST —
BETADIST(x,alpha,beta[,a,b])
BETADIST function returns the cumulative beta distribution. a is the optional lower bound of x and b is the optional upper bound of x.
If a is not given, BETADIST uses 0.
If b is not given, BETADIST uses 1.
If x < a or x > b BETADIST returns #NUM! error.
If alpha <= 0 or beta <= 0, BETADIST returns #NUM! error.
If a >= b BETADIST returns #NUM! error.
This function is Excel compatible.
BETAINV —
BETAINV(p,alpha,beta[,a,b])
BETAINV function returns the inverse of cumulative beta distribution. a is the optional lower bound of x and b is the optional upper bound of x.
If a is not given, BETAINV uses 0.
If b is not given, BETAINV uses 1.
If p < 0 or p > 1 BETAINV returns #NUM! error.
If alpha <= 0 or beta <= 0, BETAINV returns #NUM! error.
If a >= b BETAINV returns #NUM! error.
This function is Excel compatible.
BINOMDIST —
BINOMDIST(n,trials,p,cumulative)
BINOMDIST function returns the binomial distribution. n is the number of successes, trials is the total number of independent trials, p is the probability of success in trials, and cumulative describes whether to return the sum of the binomial function from 0 to n.
If n or trials are non-integer they are truncated.
If n < 0 or trials < 0 BINOMDIST returns #NUM! error.
If n > trials BINOMDIST returns #NUM! error.
If p < 0 or p > 1 BINOMDIST returns #NUM! error.
This function is Excel compatible.
CAUCHY —
CAUCHY(x,a,cum)
CHIDIST —
CHIDIST(x,dof)
CHIINV —
CHIINV(p,dof)
CHITEST —
CHITEST(actual_range,theoretical_range)
CONFIDENCE —
CONFIDENCE(x,stddev,size)
CONFIDENCE function returns the confidence interval for a mean. x is the significance level, stddev is the population standard deviation, and size is the size of the sample.
If size is non-integer it is truncated.
If size < 0 CONFIDENCE returns #NUM! error.
If size is 0 CONFIDENCE returns #DIV/0! error.
This function is Excel compatible.
CORREL —
CORREL(array1,array2)
CORREL returns the correlation coefficient of two data sets.
Strings and empty cells are simply ignored.
This function is Excel compatible.
COUNT —
COUNT(b1, b2, ...)
COUNT returns the total number of integer or floating point arguments passed.
This function is Excel compatible.
COUNTA —
COUNTA(b1, b2, ...)
COUNTA returns the number of arguments passed not including empty cells.
This function is Excel compatible.
COVAR —
COVAR(array1,array2)
COVAR returns the covariance of two data sets.
Strings and empty cells are simply ignored.
This function is Excel compatible.
CRITBINOM —
CRITBINOM(trials,p,alpha)
CRITBINOM function returns the smallest value for which the cumulative is greater than or equal to a given value. n is the number of trials, p is the probability of success in trials, and alpha is the criterion value.
If trials is a non-integer it is truncated.
If trials < 0 CRITBINOM returns #NUM! error.
If p < 0 or p > 1 CRITBINOM returns #NUM! error.
If alpha < 0 or alpha > 1 CRITBINOM returns #NUM! error.
This function is Excel compatible.
CRONBACH —
CRONBACH(ref1,ref2,...)
DEVSQ —
DEVSQ(n1, n2, ...)
DEVSQ returns the sum of squares of deviations of a data set from the sample mean.
Strings and empty cells are simply ignored.
This function is Excel compatible.
EXPONDIST —
EXPONDIST(x,y,cumulative)
EXPPOWDIST —
EXPPOWDIST(x,a,b)
FDIST —
FDIST(x,dof1,dof2)
FINV —
FINV(p,dof1,dof2)
FISHER —
FISHER(x)
FISHERINV —
FISHERINV(x)
FORECAST —
FORECAST(x,known_y's,known_x's)
FORECAST function estimates a future value according to existing values using simple linear regression. The estimated future value is a y-value for a given x-value (x).
If known_x or known_y contains no data entries or different number of data entries, FORECAST returns #N/A error.
If the variance of the known_x is zero, FORECAST returns #DIV/0 error.
This function is Excel compatible.
FREQUENCY —
FREQUENCY(data_array,bins_array)
FREQUENCY function counts how often given values occur within a range of values. The results are given as an array.
data_array is a data array for which you want to count the frequencies. bin_array is an array containing the intervals into which you want to group the values in data_array. If the bin_array is empty, FREQUENCY returns the number of data points in data_array.
This function is Excel compatible.
FTEST —
FTEST(array1,array2)
FTEST function returns the two-tailed probability that the variances in the given two data sets are not significantly different.
This function is Excel compatible.
GAMMADIST —
GAMMADIST(x,alpha,beta,cum)
GAMMADIST function returns the gamma distribution. If cum is TRUE, GAMMADIST returns the incomplete gamma function, otherwise it returns the probability mass function.
If x < 0 GAMMADIST returns #NUM! error.
If alpha <= 0 or beta <= 0, GAMMADIST returns #NUM! error.
This function is Excel compatible.
GAMMAINV —
GAMMAINV(p,alpha,beta)
GAMMALN —
GAMMALN(x)
GEOMDIST —
GEOMDIST(k,p,cum)
GEOMEAN —
GEOMEAN(b1, b2, ...)
GEOMEAN returns the geometric mean of the given arguments. This is equal to the Nth root of the product of the terms.
This function is Excel compatible.
GROWTH —
GROWTH(known_y's[,known_x's,new_x's,const])
GROWTH function applies the ``least squares'' method to fit an exponential curve to your data and predicts the exponential growth by using this curve.
GROWTH returns an array having one column and a row for each data point in new_x.
If known_x's is omitted, an array {1, 2, 3, ...} is used.
If new_x's is omitted, it is assumed to be the same as known_x's.
If known_y's and known_x's have unequal number of data points, GROWTH returns #NUM! error.
If const is FALSE, the line will be forced to go through the origin, i.e., b will be zero. The default is TRUE.
HARMEAN —
HARMEAN(b1, b2, ...)
HARMEAN returns the harmonic mean of the N data points (that is, N divided by the sum of the inverses of the data points).
This function is Excel compatible.
HYPGEOMDIST —
HYPGEOMDIST(x,n,M,N)
HYPGEOMDIST function returns the hypergeometric distribution. x is the number of successes in the sample, n is the number of trials, M is the number of successes overall, and N is the population size.
If x,n,M or N is a non-integer it is truncated.
If x,n,M or N < 0 HYPGEOMDIST returns #NUM! error.
If x > M or n > N HYPGEOMDIST returns #NUM! error.
This function is Excel compatible.
INTERCEPT —
INTERCEPT(known_y's,known_x's)
INTERCEPT function calculates the point where the linear regression line intersects the y-axis.
If known_x or known_y contains no data entries or different number of data entries, INTERCEPT returns #N/A error.
If the variance of the known_x is zero, INTERCEPT returns #DIV/0 error.
This function is Excel compatible.
KURT —
KURT(n1, n2, ...)
KURT returns an unbiased estimate of the kurtosis of a data set.
Note, that this is only meaningful if the underlying distribution really has a fourth moment. The kurtosis is offset by three such that a normal distribution will have zero kurtosis.
Strings and empty cells are simply ignored.
If fewer than four numbers are given or all of them are equal KURT returns #DIV/0! error.
This function is Excel compatible.
KURTP —
KURTP(n1, n2, ...)
KURTP returns the population kurtosis of a data set.
Strings and empty cells are simply ignored.
If fewer than two numbers are given or all of them are equal KURTP returns #DIV/0! error.
LANDAU —
LANDAU(x)
LARGE —
LARGE(n1, n2, ..., k)
LARGE returns the k-th largest value in a data set.
If data set is empty LARGE returns #NUM! error.
If k <= 0 or k is greater than the number of data items given LARGE returns #NUM! error.
This function is Excel compatible.
LINEST —
LINEST(known_y's[,known_x's[,const[,stat]]])
LINEST function calculates the ``least squares'' line that best fit to your data in known_y's. known_x's contains the corresponding x's where y=mx+b.
LINEST returns an array having two columns and one row. The slope (m) of the regression line y=mx+b is given in the first column and the y-intercept (b) in the second.
If stat is TRUE, extra statistical information will be returned. Extra statistical information is written bellow the regression line coefficients in the result array. Extra statistical information consists of four rows of data. In the first row the standard error values for the coefficients m1, (m2, ...), b are represented. The second row contains the square of R and the standard error for the y estimate. The third row contains the F-observed value and the degrees of freedom. The last row contains the regression sum of squares and the residual sum of squares.
If known_x's is omitted, an array {1, 2, 3, ...} is used.
If known_y's and known_x's have unequal number of data points, LINEST returns #NUM! error.
If const is FALSE, the line will be forced to go through the origin, i.e., b will be zero. The default is TRUE.
The default of stat is FALSE.
LOGEST —
LOGEST(known_y's[,known_x's,const,stat])
LOGEST function applies the ``least squares'' method to fit an exponential curve of the form
y = b * m{1}^x{1} * m{2}^x{2}... to your data.
If stat is TRUE, extra statistical information will be returned. Extra statistical information is written bellow the regression line coefficients in the result array. Extra statistical information consists of four rows of data. In the first row the standard error values for the coefficients m1, (m2, ...), b are represented. The second row contains the square of R and the standard error for the y estimate. The third row contains the F-observed value and the degrees of freedom. The last row contains the regression sum of squares and the residual sum of squares.
If known_x's is omitted, an array {1, 2, 3, ...} is used. LOGEST returns an array { m{n},m{n-1}, ...,m{1},b }.
If known_y's and known_x's have unequal number of data points, LOGEST returns #NUM! error.
If const is FALSE, the line will be forced to go through (0,1),i.e., b will be one. The default is TRUE.
The default of stat is FALSE.
LOGFIT —
LOGFIT(known_y's,known_x's)
LOGFIT function applies the ``least squares'' method to fit the logarithmic equation
y = a + b * ln(sign * (x - c)) , sign = +1 or -1
to your data. The graph of the equation is a logarithmic curve moved horizontally by c and possibly mirrored across the y-axis (if sign = -1).
LOGFIT returns an array having five columns and one row. `Sign' is given in the first column, `a', `b', and `c' are given in columns 2 to 4. Column 5 holds the sum of squared residuals.
An error is returned when there are less than 3 different x's or y's, or when the shape of the point cloud is too different from a ``logarithmic'' one.
You can use the above formula
= a + b * ln(sign * (x - c))
or rearrange it to
= (exp((y - a) / b)) / sign + c
to compute unknown y's or x's, respectively.
Technically, this is non-linear fitting by trial-and-error. The accuracy of `c' is: width of x-range -> rounded to the next smaller (10^integer), times 0.000001. There might be cases in which the returned fit is not the best possible.
LOGINV —
LOGINV(p,mean,stddev)
LOGINV function returns the inverse of the lognormal cumulative distribution. p is the given probability corresponding to the normal distribution, mean is the arithmetic mean of the distribution, and stddev is the standard deviation of the distribution.
If p < 0 or p > 1 or stddev <= 0 LOGINV returns #NUM! error.
This function is Excel compatible.
LOGISTIC —
LOGISTIC(x,a)
LOGNORMDIST —
LOGNORMDIST(x,mean,stddev)
LOGNORMDIST function returns the lognormal distribution. x is the value for which you want the distribution, mean is the mean of the distribution, and stddev is the standard deviation of the distribution.
If stddev = 0 LOGNORMDIST returns #DIV/0! error.
If x <= 0, mean < 0 or stddev < 0 LOGNORMDIST returns #NUM! error.
This function is Excel compatible.
LOGREG —
LOGREG(known_y's[,known_x's[,const[,stat]]])
LOGREG function transforms your x's to z=ln(x) and applies the ``least squares'' method to fit the linear equation
y = m * z + b
to your y's and z's --- equivalent to fitting the equation
y = m * ln(x) + b
to y's and x's.
If known_x's is omitted, an array {1, 2, 3, ...} is used. LOGREG returns an array having two columns and one row. m is given in the first column and b in the second.
If known_y's and known_x's have unequal number of data points, LOGREG returns #NUM! error.
If const is FALSE, the curve will be forced to go through [1; 0], i.e., b will be zero. The default is TRUE.
If stat is TRUE, extra statistical information will be returned which applies to the state AFTER transformation to z. Extra statistical information is written below m and b in the result array. Extra statistical information consists of four rows of data. In the first row the standard error values for the coefficients m, b are represented. The second row contains the square of R and the standard error for the y estimate. The third row contains the F-observed value and the degrees of freedom. The last row contains the regression sum of squares and the residual sum of squares.The default of stat is FALSE.
MAX —
MAX(b1, b2, ...)
MAX returns the value of the element of the values passed that has the largest value, with negative numbers considered smaller than positive numbers.
This function is Excel compatible.
MAXA —
MAXA(number1,number2,...)
MAXA returns the largest value of the given arguments. Numbers, text and logical values are included in the calculation too. If the cell contains text or the argument evaluates to FALSE, it is counted as value zero (0). If the argument evaluates to TRUE, it is counted as one (1). Note that empty cells are not counted.
This function is Excel compatible.
MEDIAN —
MEDIAN(n1, n2, ...)
MEDIAN returns the median of the given data set.
Strings and empty cells are simply ignored.
If even numbers are given MEDIAN returns the average of the two numbers in the middle.
This function is Excel compatible.
MIN —
MIN(b1, b2, ...)
MIN returns the value of the element of the values passed that has the smallest value, with negative numbers considered smaller than positive numbers.
This function is Excel compatible.
MINA —
MINA(number1,number2,...)
MINA returns the smallest value of the given arguments. Numbers, text and logical values are included in the calculation too. If the cell contains text or the argument evaluates to FALSE, it is counted as value zero (0). If the argument evaluates to TRUE, it is counted as one (1). Note that empty cells are not counted.
This function is Excel compatible.
MODE —
MODE(n1, n2, ...)
MODE returns the most common number of the data set. If the data set has many most common numbers MODE returns the first one of them.
Strings and empty cells are simply ignored.
If the data set does not contain any duplicates MODE returns #N/A error.
This function is Excel compatible.
NEGBINOMDIST —
NEGBINOMDIST(f,t,p)
NEGBINOMDIST function returns the negative binomial distribution. f is the number of failures, t is the threshold number of successes, and p is the probability of a success.
If f or t is a non-integer it is truncated.
If (f + t -1) <= 0 NEGBINOMDIST returns #NUM! error.
If p < 0 or p > 1 NEGBINOMDIST returns #NUM! error.
This function is Excel compatible.
NORMDIST —
NORMDIST(x,mean,stddev,cumulative)
NORMINV —
NORMINV(p,mean,stddev)
NORMINV function returns the inverse of the normal cumulative distribution. p is the given probability corresponding to the normal distribution, mean is the arithmetic mean of the distribution, and stddev is the standard deviation of the distribution.
If p < 0 or p > 1 or stddev <= 0 NORMINV returns #NUM! error.
This function is Excel compatible.
NORMSDIST —
NORMSDIST(x)
NORMSINV —
NORMSINV(p)
PARETO —
PARETO(x,a,b)
PEARSON —
PEARSON(array1,array2)
PERCENTILE —
PERCENTILE(array,k)
PERCENTILE function returns the 100*k-th percentile of the given data points (that is, a number x such that a fraction k of the data points are less than x).
If array is empty, PERCENTILE returns #NUM! error.
If k < 0 or k > 1, PERCENTILE returns #NUM! error.
This function is Excel compatible.
PERCENTRANK —
PERCENTRANK(array,x[,significance])
PERCENTRANK function returns the rank of a data point in a data set. array is the range of numeric values, x is the data point which you want to rank, and the optional significance specifies the number of significant digits for the returned value, truncating the remainder. If significance is omitted, PERCENTRANK uses three digits.
If array contains no data points, PERCENTRANK returns #NUM! error.
If significance is less than one, PERCENTRANK returns #NUM! error.
If x exceeds the largest value or is less than the smallest value in array, PERCENTRANK returns #NUM! error.
If x does not match any of the values in array or x matches more than once, PERCENTRANK interpolates the returned value.
PERMUT —
PERMUT(n,k)
POISSON —
POISSON(x,mean,cumulative)
POISSON function returns the Poisson distribution. x is the number of events, mean is the expected numeric value cumulative describes whether to return the sum of the Poisson function from 0 to x.
If x is a non-integer it is truncated.
If x < 0 POISSON returns #NUM! error.
If mean <= 0 POISSON returns the #NUM! error.
This function is Excel compatible.
PROB —
PROB(x_range,prob_range,lower_limit[,upper_limit])
PROB function returns the probability that values in a range or an array are between two limits. If upper_limit is not given, PROB returns the probability that values in x_range are equal to lower_limit.
If the sum of the probabilities in prob_range is not equal to 1 PROB returns #NUM! error.
If any value in prob_range is <=0 or > 1, PROB returns #NUM! error.
If x_range and prob_range contain a different number of data entries, PROB returns #N/A error.
This function is Excel compatible.
QUARTILE —
QUARTILE(array,quart)
QUARTILE function returns the quartile of the given data points.
If quart is equal to: QUARTILE returns:
0 the smallest value of array.
1 the first quartile
2 the second quartile
3 the third quartile
4 the largest value of array.
If array is empty, QUARTILE returns #NUM! error.
If quart < 0 or quart > 4, QUARTILE returns #NUM! error.
If quart is not an integer, it is truncated.
This function is Excel compatible.
RANK —
RANK(x,ref[,order])
RANK returns the rank of a number in a list of numbers. x is the number whose rank you want to find, ref is the list of numbers, and order specifies how to rank numbers. If order is 0, numbers are ranked in descending order, otherwise numbers are ranked in ascending order.
This function is Excel compatible.
RAYLEIGH —
RAYLEIGH(x,sigma)
RAYLEIGHTAIL —
RAYLEIGHTAIL(x,a,sigma)
RSQ —
RSQ(array1,array2)
SKEW —
SKEW(n1, n2, ...)
SKEW returns an unbiased estimate for skewness of a distribution.
Note, that this is only meaningful if the underlying distribution really has a third moment. The skewness of a symmetric (e.g., normal) distribution is zero.
Strings and empty cells are simply ignored.
If less than three numbers are given, SKEW returns #DIV/0! error.
This function is Excel compatible.
SKEWP —
SKEWP(n1, n2, ...)
SKEWP returns the population skewness of a data set.
Strings and empty cells are simply ignored.
If less than two numbers are given, SKEWP returns #DIV/0! error.
SLOPE —
SLOPE(known_y's,known_x's)
SMALL —
SMALL(n1, n2, ..., k)
SMALL returns the k-th smallest value in a data set.
If data set is empty SMALL returns #NUM! error.
If k <= 0 or k is greater than the number of data items given SMALL returns #NUM! error.
This function is Excel compatible.
SSMEDIAN —
SSMEDIAN(array[,interval)]
The SSMEDIAN function returns the median for grouped data as commonly determined in the social sciences. The data points given in array are assumed to be the result of grouping data into intervals of length interval
If interval is not given, SSMEDIAN uses 1.
If array is empty, SSMEDIAN returns #NUM! error.
If interval <= 0, SSMEDIAN returns #NUM! error.
SSMEDIAN does not check whether the data points are at least interval apart.
STANDARDIZE —
STANDARDIZE(x,mean,stddev)
STDEV —
STDEV(b1, b2, ...)
STDEV returns standard deviation of a set of numbers treating these numbers as members of a population.
This function is Excel compatible.
STDEVA —
STDEVA(number1,number2,...)
STDEVA returns the standard deviation based on a sample. Numbers, text and logical values are included in the calculation too. If the cell contains text or the argument evaluates to FALSE, it is counted as value zero (0). If the argument evaluates to TRUE, it is counted as one (1). Note that empty cells are not counted.
This function is Excel compatible.
STDEVP —
STDEVP(b1, b2, ...)
STDEVP returns standard deviation of a set of numbers treating these numbers as members of a complete population.
This function is Excel compatible.
STDEVPA —
STDEVPA(number1,number2,...)
STDEVPA returns the standard deviation based on the entire population. Numbers, text and logical values are included in the calculation too. If the cell contains text or the argument evaluates to FALSE, it is counted as value zero (0). If the argument evaluates to TRUE, it is counted as one (1). Note that empty cells are not counted.
This function is Excel compatible.
STEYX —
STEYX(known_y's,known_x's)
STEYX function returns the standard error of the predicted y-value for each x in the regression.
If known_y's and known_x's are empty or have a different number of arguments then STEYX returns #N/A error.
This function is Excel compatible.
SUBTOTAL —
SUBTOTAL(function_nbr,ref1,ref2,...)
SUBTOTAL function returns a subtotal of given list of arguments. function_nbr is the number that specifies which function to use in calculating the subtotal.
The following functions are available:
1 AVERAGE
2 COUNT
3 COUNTA
4 MAX
5 MIN
6 PRODUCT
7 STDEV
8 STDEVP
9 SUM
10 VAR
11 VARP
This function is Excel compatible.
TDIST —
TDIST(x,dof,tails)
TDIST function returns the Student's t-distribution. dof is the degree of freedom and tails is 1 or 2 depending on whether you want one-tailed or two-tailed distribution.
If dof < 1 TDIST returns #NUM! error.
If tails is neither 1 or 2 TDIST returns #NUM! error.
This function is Excel compatible.
TINV —
TINV(p,dof)
TREND —
TREND(known_y's[,known_x's[,new_x's[,const]]])
TREND function estimates future values of a given data set using the ``least squares'' line that best fit to your data. known_y's is the y-values where y=mx+b and known_x's contains the corresponding x-values. new_x's contains the x-values for which you want to estimate the y-values. If const is FALSE, the line will be forced to go through the origin, i.e., b will be zero.
If known_x's is omitted, an array {1, 2, 3, ...} is used.
If new_x's is omitted, it is assumed to be the same as known_x's.
If const is omitted, it is assumed to be TRUE.
If known_y's and known_x's have unequal number of data points, TREND returns #NUM! error.
TRIMMEAN —
TRIMMEAN(ref,fraction)
TRIMMEAN returns the mean of the interior of a data set. ref is the list of numbers whose mean you want to calculate and fraction is the fraction of the data set excluded from the mean. For example, if fraction=0.2 and the data set contains 40 numbers, 8 numbers are trimmed from the data set (40 x 0.2), 4 from the top and 4 from the bottom of the set.
This function is Excel compatible.
TTEST —
TTEST(array1,array2,tails,type)
TTEST function returns the probability of a Student's t-Test.
array1 is the first data set and array2 is the second data set. If tails is one, TTEST uses the one-tailed distribution and if tails is two, TTEST uses the two-tailed distribution. type determines the kind of the test:
1 Paired test
2 Two-sample equal variance
3 Two-sample unequal variance
If the data sets contain a different number of data points and the test is paired (type one), TTEST returns the #N/A error.
tails and type are truncated to integers.
If tails is not one or two, TTEST returns #NUM! error.
If type is any other than one, two, or three, TTEST returns #NUM! error.
This function is Excel compatible.
Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1, and the cells B1, B2, ... B5 23.2, 25.8, 29.9, 33.5, and 42.7. Then
TTEST(A1:A5,B1:B5,1,1) equals 0.003127619.
TTEST(A1:A5,B1:B5,2,1) equals 0.006255239.
TTEST(A1:A5,B1:B5,1,2) equals 0.111804322.
TTEST(A1:A5,B1:B5,1,3) equals 0.113821797.
VAR —
VAR(b1, b2, ...)
VAR estimates the variance of a sample of a population. To get the true variance of a complete population use VARP.
VAR is also known as the N-1-variance. Under reasonable conditions, it is the maximum-likelihood estimator for the true variance.
This function is Excel compatible.
VARA —
VARA(number1,number2,...)
VARA returns the variance based on a sample. Numbers, text and logical values are included in the calculation too. If the cell contains text or the argument evaluates to FALSE, it is counted as value zero (0). If the argument evaluates to TRUE, it is counted as one (1). Note that empty cells are not counted.
This function is Excel compatible.
VARP —
VARP(b1, b2, ...)
VARP calculates the variance of a set of numbers where each number is a member of a population and the set is the entire population.
VARP is also known as the N-variance.
VARPA —
VARPA(number1,number2,...)
VARPA returns the variance based on the entire population. Numbers, text and logical values are included in the calculation too. If the cell contains text or the argument evaluates to FALSE, it is counted as value zero (0). If the argument evaluates to TRUE, it is counted as one (1). Note that empty cells are not counted.
This function is Excel compatible.
WEIBULL —
WEIBULL(x,alpha,beta,cumulative)
WEIBULL function returns the Weibull distribution. If the cumulative boolean is true it will return:
1 - exp (-(x/beta)^alpha),
otherwise it will return
(alpha/beta^alpha) * x^(alpha-1) * exp(-(x/beta^alpha)).
If x < 0 WEIBULL returns #NUM! error.
If alpha <= 0 or beta <= 0 WEIBULL returns #NUM! error.
This function is Excel compatible.
ZTEST —
ZTEST(ref,x)
ZTEST returns the two-tailed probability of a z-test.
ref is the data set and x is the value to be tested.
If ref contains less than two data items ZTEST returns #DIV/0! error.
This function is Excel compatible.
CLEAN —
CLEAN(string)
CONCATENATE —
CONCATENATE(string1[,string2...])
EXACT —
EXACT(string1, string2)
FIND —
FIND(string1,string2[,start])
FIXED —
FIXED(num,[decimals, no_commas])
LEFT —
LEFT(text[,num_chars])
LEN —
LEN(string)
LOWER —
LOWER(text)
MID —
MID(string, position, length)
PROPER —
PROPER(string)
REPLACE —
REPLACE(old,start,num,new)
RIGHT —
RIGHT(text[,num_chars])
SEARCH —
SEARCH(search_string,text[,start_num])
SEARCH returns the location of the search_ string within text. The search starts with the start_num character of text text. If start_num is omitted, it is assumed to be one. The search is not case sensitive.
search_string can contain wildcard characters (*) and question marks (?). A question mark matches any character and a wildcard matches any string including the empty string. If you want the actual wildcard or question mark to be found, use tilde (~) before the character.
If search_string is not found, SEARCH returns #VALUE! error.
If start_num is less than one or it is greater than the length of text, SEARCH returns #VALUE! error.
This function is Excel compatible.
SUBSTITUTE —
SUBSTITUTE(text, old, new [,num])
T —
T(value)
TEXT —
TEXT(value,format_text)
TEXT returns value as a string with the specified format.
This function is Excel compatible.
TRIM —
TRIM(text)
Previous Function Reference | Contents | Next Keybinding Reference |
Previous | Next |
This appendix lists the keyboard shortcuts which are defined by default in Gnumeric.
Table of Contents
Previous Alphabetical List of Gnumeric Functions | Contents | Next Gnumeric Keybindings |
Previous |
Keybindings are combinations of keystrokes which tell an application to run a task. These can greatly speed-up the user's interactions with an application. Some of the most common ones are Ctrl+s to save a file or Ctrl+q to quit the application. Gnumeric also comes with keybindings to make your spreadsheet exprience faster.
Normally, keybindings are next to a command in a menu. For example, if Save has Ctrl+s next to it, that means that Ctrl+s can be typed at the same time to save your file. However, some keystrokes aren't listed in the menus. They are as follows:
F2 sets the current cell for editing. The cursor is inserted at the end of the current text.
F3 opens the Load file dialog window.
Ctrl-F3 opens the Define Name dialog window.
F5 opens the Go to dialog window which allows you to jump to a specified cell.
F6 opens the Search and Replace dialog where you can search through your spreadsheets for text strings and replace them with something else.
F7 opens the Search Center. The Search Center allows you to search through your spreadsheets for text strings.
Ctrl-~ Formats the current selection as a number.
Ctrl-$ Formats the current selection with the default currency
Ctrl-# Formats the current selection with default date style
Ctrl-^ Formats the current selection as using scientific notation
Ctrl-@ Formats the current selection with the default time format
Ctrl-! Formats the current selection with the default accounting format
Ctrl-& Adds a thin border around the current selection
Ctrl-_ Removes any borders around or in the current selection
Ctrl-$ Formats the current selection as the default currency
Previous Keybinding Reference | Contents |