LINUXUSER

Working with Gnome’s Gnumeric FASTFAST ACCOUNTINGACCOUNTING original photo: www.sxc.hu

OpenOffice Calc is fine for most spreadsheet applications, but if you’re looking for better performance and a smaller footprint, try Calc’s lean competitor, Gnumeric. BY OLIVER FROMMEL entering these values really simple. Just type the starting value in the first cell, preadsheet applications have al- all other spreadsheet applications. The and the value in the second cell. Se- ways played a special role on the developers have made sure that Gnu- lect both, by holding down [Ctrl] (the SPC. One of the first commercial meric is compatible with its competitors key for multiple selections in Gnumeric) spreadsheet programs, Lotus 123 was re- – with a few special exceptions, such as and clicking on both cells. Then again garded as a benchmark for the compati- embedded MS Office objects. And Gnu- drag the mouse to the bottom right cor- bility of so-called IBM compatible PCs. meric can handle all the math functions ner of the second cell. Click and drag the Excel came along a few years later, and that Excel offers. mouse to fill as many cells as you like "Excel file" soon became synonymous When you launch the program via the with the numeric series (Figure 2). Gnu- with a spreadsheet document. menu, or type gnumeric at the command meric references the two starting values Of course, spreadsheet applications line, the main window appears in a mat- to calculate the step. If you enter 1 and 2 can do much more than the simple cal- ter of seconds. The OpenOffice Calc for example, Gnumeric will fill the se- culations most people use them for. spreadsheet, by contrast, takes about lected cells with 3, 4, 5, 6, and so on. If Where really shine is in three times as long. you need a series of even , just managing recurring calculations and vi- Manually filling a with is use 2 and 4 as your starting values. sualizing the resulting data in the form quite easy: just click on a cell and enter Gnumeric gives you 256 columns by of easily readable . In the world of the values you need. There is no need to default, but you can easily extend this Linux, the Gnumeric spreadsheet tool retype a value to copy it to a neighboring limit if you build the software yourself. (Figure 1) has become an extremely ma- cell. Just click on the original value, then To do so, change the value of SHEET_ ture application. drag the mouse to the bottom right cor- MAX_COLS and SHEET_MAX_ROWS in ner of the cell. The mouse cursor be- the src/gnumeric.h file. Input comes a fine cross. Now hold down the Gnumeric’s age shows. Launched by mouse button and drag a frame over the Maths Genius Gnome founder , Gnu- cells to which you will be copying the Of course, just typing rows of figures is meric is the oldest Gnome program of original value, and let Gnumeric com- not much use unless you can perform them all, an important building block of plete the job. calculations. To help you do this, Gnu- the Gnome project. Now in its eighth meric provides several mathematical year, Gnumeric offers a wide range of Enumerations Made Simple functions, from simple sums and differ- functions and genuine stability. Addi- Spreadsheets very often contain numeric ences to complex statistical calculations. tionally, the program does not attempt to sequences; for example, you might have Gnumeric beats most competitors in emulate its counterpart, Excel, numeric values in the first column to terms of accuracy and functional scope. but goes its own way and tries to outdo count the rows. Again, Gnumeric makes If you know the name of a ,

86 ISSUE 62 JANUARY 2006 WWW.LINUX - MAGAZINE.COM Gnumeric LINUXUSER

Figure 1: Gnumeric is a fast and versatile spreadsheet with support Figure 2: To create a numeric series, type the first two values then for many mathematical and scientific functions. drag the bottom right corner of the selection. you can just type an equals sign fol- to pop up a window with a list of avail- the formula wizard to confirm each ar- lowed by that name in the cell. The able functions. The program lists the gument line. function arguments will typically be functions by field of application on the other cells identified by a letter and a left: , scientific, financial, statis- Interfacing number; for example, the top left cell is tics, and so on. If you need a function that Gnumeric A1. To add A1 and A2, you can type [Ctrl]+[F] opens the search function, does not offer, you may be able to add a =sum(A1;A2) in another cell. If you which is not very practical, since a plugin. Gnumeric offers plugins in , for copy this formula, and insert it in an- search only searches the category example. The interface allows you to get other cell, Gnumeric automatically mod- names. The same thing applies to the list the value in the cell by calling c.get_ ifies the argument names to match; that of functions itself. [Ctrl]+[F] displays a value(), but unfortunately, some distri- is, you would have =sum(B1;B2) for small search window, but the search is butions do not include the interface. column B. While the text cursor is mark- restricted to the function name and does Again, you might need to build Gnu- ing the spot in the cell where you need not include the descriptions, which meric from the source code to fully ex- to insert an argument, you can simply would be more useful. In other words, if plore the potential of Gnumeric plugins. click the required cell. Gnumeric draws a you are looking for a function to solve a Gnumeric lets you import third party black and white frame around the cell specific problem, you almost need to formats such as Excel, , Mul- and waits for more input. You can then know the function name before you tiplan, Lotus 123, OpenOffice Calc, and type a semicolon and click more cells to start. On the other hand, the fact that the Xbase. Gnumeric also reads comma-sep- add more arguments. function descriptions in Gnumeric tell arated text files (CSV) and has a wizard As an alternative, click the f(x) button you if these functions are Excel compati- for processing structured text files. Gnu- to insert a function. This tells Gnumeric ble can be useful. meric uses the GnomeDB interface to After selecting read input from database formats such the required func- as Postgresql or Mysql. tion, click the Insert button to Good Alternative launch the For- The Gnumeric spreadsheet outpaces its mula Guru (Figure competitors with a huge collection of 3). The guru gives mathematical and scientific functions. you an input line And even if you don’t need all this for the required rocket science, Gnumeric is still a lean function argu- and powerful program for everyday ments. You can tasks. ■ select a line and click on the cell INFO with the required [1] Gnumeric: http:// www. . org/ value, rather than projects/ gnumeric entering the val- [2] Python in Gnumeric: http:// www. ues manually. gnome. org/ projects/ gnumeric/ doc/ Figure 3: The formula guru helps users enter more complex formulas. Press [Enter] in sect-extending-python.

WWW.LINUX - MAGAZINE.COM ISSUE 62 JANUARY 2006 87