Abacus(1)

NAME
Abacus, abacus - a small,light and easy to use graphical spreadsheet (WYSIWYG) for X.

SYNOPSIS
abacus [file]

DESCRIPTION
abacus runs the spreadsheet opening a given previously saved sheet with the name [file] by default abacus creates a new sheet named example1.wk1. There are some already made examples in [ABACUS-HOME-DIRECTORY]/regressive named *.wk1. Abacus by Arlindo Oliveira, Antonio Rendas and Vasco Amaral implemented in John Ousterhout's Tcl/Tk toolkit 8.0, .br Informations about the latest version of Abacus is always available at

http://tahoe.inesc.pt/~aml/abacus/abacus.html .br or at .br http://www-cad.eecs.berkeley.edu/HomePages/aml/abacus/abacus.html

INSTALLATION
In order to Install Abacus you should have already installed Tcl/Tk 8.0 (or higher) and have a C and C++ compiler.

To install simply:
    .br .br - make dep .br - make .br - Define the shell variable ABACUS_HOME pointing to the directory where is was installed .br - Define the sheel variable ABACUS_EDITOR pointing to you preferred editor (so that you are able to edit scripts) .br - Define the sheel variable ABACUS_BROWSER pointing to your Web Browser .br - Type 'abacus' and have fun

USING Abacus

  Abacus Macros System
Abacus has a built-in macro system using Tcl/Tk (which by chance is the same language used to build it) that allows any user to run a script within a given spreadsheet. Basically that means that you can edit a Tcl/Tk script and run it 'inside' your environment, either to perform a bunch of tedious operations in a handy way, or you can use Tk's sophisticated widget family to build a whole new application within the Abacus. There are basically two commands associated to the macro system, you can run a macro, or spawn an external editor and edit a macro file. A whole list of all available macro commands will be available here soon, describing in detail what each command does and receives, but if you're just too curious, check out tcl_interf/tcl_interf.cc file and see if you can find out what are the commands we are exporting to the tcl interpreter.

  Working with Formulas
In order to use forlumas in cells the user must type '=' and then the rest of the formula (that can be either simple or complex). Another way to create a formula is to select the cell and then select "fx" button on the toolbar where you may find the listing of all available formulas functions and select it or just find some help about. Abacus has available the following functions that you can use as complex formulas: Math And Trignometric Functions .br

FUNCTION - ABS
    .br SINTAX: .br @ABS(number) .br @ABS(Cell) .br DESCRIPTION: .br This function returns the absolute value of a given Cell/number. An absolute value of a given number is it's number without it's signal. .br EXAMPLES: .br The result of @ABS(-5) equals to 5. .br The result of @ABS(A1) if Cell A1 contains -5 will be equal to 5.

FUNCTION - ACOS
    .br SINTAX: .br @ACOS(number) .br @ACOS(Cell) .br DESCRIPTION: Returns the value of the corresponding inverse trignometric function cosine of the given argument. The arc-cosine is the angle which cosin is the argument. The argument must be a numeric expression in the range of -1<=argument<=1. The returned value is an angle in radians in the range of 0<=returned value <= PI. If conversion should be needed from radians to degrees use the following formula @ACOS(argument)*180/@PI(). .br EXAMPLES: .br The result of @ACOS(-0.5) is equal to 2.0943951 ( 2 PI/3 radians). .br The result of @ACOS(-0.5)*180/@PI() is equal to 120 (degrees).

FUNCTION - ASIN
    .br SINTAX: .br @ASIN(number) .br @ASIN(Cell) .br DESCRIPTION: .br Returns the value of the corresponding inverse trignometric function sine of the given argument. The arc-sine is the angle which sine is the argument. The argument must be a numeric expression in the range of -1<=argument<=1. The returned value is an angle in radians in the range of -PI/2 <=returned value <= PI/2. If conversion should be needed from radians to degrees use the following formula @ASIN(argument)*180/@PI(). .br EXAMPLES: .br The result of @ASIN(-0.5) is equal to -0.5235988 ( -PI/6 radians). .br The result of @ASIN(-0.5)*180/@PI() is equal to -30 (degrees).

FUNCTION - ATAN
    .br SINTAX: .br @ATAN(number) .br @ATAN(Cell) .br DESCRIPTION: .br Returns the value of the corresponding inverse trignometric function tangent of the given argument. The arc-tangent is the angle which tanget is the argument. The argument can be any angle you wish. The returned value is an angle in radians in the range of -PI/2 <=returned value <= PI/2. If conversion should be needed from radians to degrees use the following formula @ATAN(argument)*180/@PI(). .br EXAMPLES: .br The result of @ATAN(1) is equal to 0.785398 ( PI/4 radians). .br The result of @ATAN(1)*180/@PI() is equal to 45 (degrees).

FUNCTION - ATAN2
    .br SINTAX: .br @ATAN(argument_x , argument_y) .br argument_x and argument_y can be each one either a number or a Cell. .br argument_x is the x coordinate of the desired point. .br argument_y is the y coordinate of the desired point. .br DESCRIPTION: .br Returns the angle between the XX radix and the line that contains the Origin (0,0) and the point which is located at the coordinate (argument_x,argument_y). The returned value is an angle in radians in the range of -PI < returned value <= PI. If argument_x and argument_y are 0, ATAN2 will result in "#DIV0!". If conversion should be needed from radians to degrees use the following formula ATAN2(argument_x:argument_y)*180/PI(). .br EXAMPLES: .br The result of @ATAN2(1 , 1) is equal to 0.785398 (PI/4 radians). .br The result of @ATAN2(-1,-1) is equal to -2.35619 (-3 PI/4 radianes). .br The result of @ATAN2(-1,-1)*180/@PI() is equal to -135(degrees).

FUNCTION - COS
    .br SINTAX: .br @COS(number) .br @COS(Cell) .br DESCRIPTION: .br Returns the cosine of a given angle. The argument is any radian number. If the angle is in degrees you should use the following convertion formula: @COS(argument*@PI()/180). .br EXAMPLES: .br The result of @COS(1.047) is equal to 0.500171. .br The result of @COS(60*@PI()/180) is equal to 0.5.

FUNCTION - EXP
    .br SINTAX: .br @EXP(number) .br @EXP(Cell) .br DESCRIPTION: .br Returns the value of the exponential function for the argument. e=2,71828182845904 EXP(x)= e^x EXP is the inverse of LN. .br EXAMPLES: .br The result of @EXP(1) is equal to 2,718282. .br The result of @EXP(2) is equal to e^2 = 7,389056. .br The result of @EXP(@LN(3)) is equal to 3.

FUNCTION - INTF
    .br SINTAX: .br @INTF(argument) .br argument can either be a cell or a number. .br DESCRIPTION: .br Converts a float to an integer. .br EXAMPLES: .br The result of @INTF(1.45555) is equal to 1. .br The result of @INTF(1) is equal to 1.

FUNCTION - LN
    .br SINTAX: .br @LN(number) .br @LN(Cell) .br DESCRIPTION: .br Returns the value of the corresponding Natural logarithm function for the argument. The Natural algorithm are based in e (2,71828182845904). The argument must be > 0. LN is the inverse of EXP. .br EXAMPLES: .br @LN(86) is equal to 4,454347. .br @LN(2,7182818) is equal to 1. .br @LN(@EXP(3))is equal to 3. .br @EXP(@LN(4)) is equal to 4.

FUNCTION - LOG
    .br SINTAX: .br @LOG(number) .br number can be either Cell or number. .br DESCRIPTION: .br Returns the value of the corresponding common base 10 logarithm function for the argument. "number" is the number for wich we want to get the logarithm. "number" must be > 0. .br EXAMPLES: .br The result of @LOG(10) is equal to 1.

FUNCTION - MOD
    .br SINTAX: .br @MOD(x,y) .br Each x and y can be either a number or a Cell. .br DESCRIPTION: .br Returns the remainder of x divided by y. .br EXAMPLES: .br The result of @MOD(3,2) is equal to 1. .br The result of @MOD(3,-2) is equal to 1. .br The result of @MOD(-3,2) is equal to -1. .br The result of @MOD(-3,-2) is equal to -1. .br FUNCTION - PI .br SINTAX: .br @PI() .br DESCRIPTION: .br Returns the value of PI=3.1415926536. .br EXAMPLES: .br The result of @PI()/2 is equal to 1.57079. .br The result of @SIN(@PI()/2) is equal to 1.

FUNCTION - RAND
    .br SINTAX: .br @RAND() .br DESCRIPTION: .br Returns a random number (0<=number<=1). EXAMPLES: .br The result of @RAND()*100 is a random number between 0 and 100.

FUNCTION - ROUND
    .br SINTAX: .br @ROUND(argument , digit) .br Each argument and digit can be either a number or a Cell. .br DESCRIPTION: .br Rounds the argument at the specified digit. digit must be an integer in such that digit>0. .br EXAMPLES: .br @ROUND(610,5765383 , 2) produces the result 610.6 .

FUNCTION - SIN
    .br SINTAX: .br @SIN(number) .br @SIN(Cell) .br DESCRIPTION: .br Returns the sine of a given angle. The argument is any radian number. If the angle is in degrees you should use the following convertion formula: @SIN(argument*@PI()/180). .br EXAMPLES: .br The result of @SIN(@PI()) is equal to 0.00000000 . .br The result of @SIN(@PI()/2) is equal to 1. .br The result of @SIN(30*@PI()/180) is equal to 0.5.

FUNCTION - SQRT
    .br SINTAX: .br @SQRT(number) .br @SQRT(Cell) .br DESCRIPTION: .br Returns the square root of the argument. in "number" <0 the message #VALUE! should appear. .br EXAMPLES: .br The result of @SQRT(25) is equal to 5. .br The result of @SQRT(-25) is equal to "#VALUE!" message. .br The result of @SQRT(@ABS(-25)) is equal to 4.

FUNCTION - SUM
    .br SINTAX: .br @SUM(number1,number2,...) .br @SUM(Cell1:Cell2) .br DESCRIPTION: .br Returns the the sum of all numbers of the argument list (number1,number2,...). If the argument is a matrix, every blank cells or with no numeric values inserted are ignored, if there is a contained cell with an error message the result should be an error message. .br EXAMPLES: .br The result of @SUM(1,2,3,4) is equal to 10. .br The result of @SUM(A1:B2), where Cells A1,A2,B1,B2 are each equal to 1, is equal to 4.

FUNCTION - TAN
    .br SINTAX: .br @TAN(number) .br @TAN(Cell) .br DESCRIPTION: .br Returns the tangent of a given angle. The argument is any radian number. If the angle is in degrees you should use the following convertion formula: @TAN(argument*@PI()/180). .br EXAMPLES: .br The result of @TAN(0.523599) is equal to 0.577350. .br The result of @TAN(45*@PI()/180) is equal to 1.

Information Functions .br

FUNCTION - ISERR
    .br SINTAX: .br ISERR(number) .br ISERR(Cell) .br DESCRIPTION: .br EXAMPLES:

FUNCTION - ISNA
    .br SINTAX: .br ISNA(number) .br ISNA(Cell) .br DESCRIPTION: .br EXAMPLES:

FUNCTION - ISNUMBER
    .br SINTAX: .br SORRY, IT IS STILL NOT IMPLEMENTED! .br ISNUMBER(number) .br ISNUMBER(Cell) .br DESCRIPTION: .br EXAMPLES:

FUNCTION - ISSTRING
    .br SINTAX: .br SORRY, IT IS STILL NOT IMPLEMENTED! .br ISSTRING(number) .br ISSTRING(Cell) .br DESCRIPTION: .br EXAMPLES:

Logical Functions .br

FUNCTION - @IF
    .br SINTAX: .br @IF(logic-test , if-true-value, if-false-value) .br "logic-test" is any value or expression that can be evaluated as being TRUE or FALSE value. .br "if-true-value" is the returned value if "logic-test" is TRUE. if "if-true-value" is omited and "logic-test" is TRUE it will be returned 0. .br "if-false-value" is the returned value if "logic-test" is TRUE. if "if-false-value" is omited and "logic-test" is TRUE it will be returned 0. .br DESCRIPTION: .br EXAMPLES:

FUNCTION - TRUE
    .br SINTAX: .br SORRY, IT IS STILL NOT IMPLEMENTED! .br @TRUE() .br DESCRIPTION: .br EXAMPLES:

FUNCTION - FALSE
    .br SINTAX: .br SORRY, IT IS STILL NOT IMPLEMENTED! .br @FALSE() .br DESCRIPTION: .br EXAMPLES:

Date And Time Functions .br

FUNCTION - DAY
    .br SINTAX: .br SORRY, IT IS STILL NOT IMPLEMENTED! .br DAY(number) DAY(Cell) .br DESCRIPTION: .br EXAMPLES:

FUNCTION - HOUR
    SINTAX: SORRY, IT IS STILL NOT IMPLEMENTED! .br HOUR(number) HOUR(Cell) DESCRIPTION: EXAMPLES:

FUNCTION - MINUTE
    .br SINTAX: .br SORRY, IT IS STILL NOT IMPLEMENTED! .br MINUTE(number) .br MINUTE(Cell) .br DESCRIPTION: .br EXAMPLES:

FUNCTION - MONTH
    .br SINTAX: .br SORRY, IT IS STILL NOT IMPLEMENTED! .br MONTH(number) .br MONTH(Cell) .br DESCRIPTION: .br EXAMPLES:

FUNCTION - SECOND
    .br SINTAX: .br SORRY, IT IS STILL NOT IMPLEMENTED! .br SECOND(number) .br SECOND(Cell) .br DESCRIPTION: .br EXAMPLES:

FUNCTION - TIMEVALUE
    .br SINTAX: .br SORRY, IT IS STILL NOT IMPLEMENTED! .br TIMEVALUE(number) .br TIMEVALUE(Cell) .br DESCRIPTION: .br EXAMPLES:

FUNCTION - TODAY
    .br SINTAX: .br SORRY, IT IS STILL NOT IMPLEMENTED! .br TODAY(number) .br TODAY(Cell) .br DESCRIPTION: .br EXAMPLES:

Text Functions .br

FUNCTION - CHAR
    .br SINTAX: .br SORRY, IT IS STILL NOT IMPLEMENTED! .br CHAR(number) .br CHAR(Cell) .br DESCRIPTION: .br EXAMPLES:

FUNCTION - CODE
    .br SINTAX: .br SORRY, IT IS STILL NOT IMPLEMENTED! .br CODE(number) .br CODE(Cell) .br DESCRIPTION: .br EXAMPLES:

FUNCTION - LENGTH
    .br SINTAX: .br SORRY, IT IS STILL NOT IMPLEMENTED! .br LENGTH(number) .br LENGTH(Cell) .br DESCRIPTION: .br EXAMPLES:

FUNCTION - LOWER
    .br SINTAX: .br SORRY, IT IS STILL NOT IMPLEMENTED! .br LOWER(number) .br LOWER(Cell) .br DESCRIPTION: .br EXAMPLES:

FUNCTION - PROPER
    .br SINTAX: .br SORRY, IT IS STILL NOT IMPLEMENTED! .br PROPER(number) .br PROPER(Cell) .br DESCRIPTION: .br EXAMPLES:

FUNCTION - STRINGF
    .br SINTAX: .br SORRY, IT IS STILL NOT IMPLEMENTED! .br STRINGF(number) .br STRINGF(Cell) .br DESCRIPTION: .br EXAMPLES:

FUNCTION - UPPER
    .br SINTAX: .br SORRY, IT IS STILL NOT IMPLEMENTED! .br UPPER(number) .br UPPER(Cell) .br DESCRIPTION: .br EXAMPLES:

FUNCTION - VALUE
    .br SINTAX: .br SORRY, IT IS STILL NOT IMPLEMENTED! .br VALUE(number) .br VALUE(Cell) .br DESCRIPTION: .br EXAMPLES:

Statistical Functions .br

FUNCTION - AVG
    .br SINTAX: .br SORRY, IT IS STILL NOT IMPLEMENTED! .br AVG(number) .br AVG(Cell) .br DESCRIPTION: .br EXAMPLES:

FUNCTION - COUNT
    .br SINTAX: .br @COUNT(value1,value2,value3,...) .br @COUNT(Cell1:Cell2) .br DESCRIPTION: .br This function returns the number of elements of the given list of arguments or rangeof cells.Cells which value is either blank or a string or even an error message will not be counted. .br EXAMPLES: The return value of @COUNT(1,1,1,1,1) is equal to 5. .br The return value of @COUNT(A1:A5) is 5 if all cells in the range have a value. if there are blank cells each of them counts as 0. for instance if A1=1,A2 and A3 are blank, A4="hello",A5=0, the reurn value will be 2.

FUNCTION - MAX
    .br SINTAX: .br @MAX(value1,value2,value3,...) .br @MAX(Cell1:Cell2) .br DESCRIPTION: .br This function returns the major number included in the given list of arguments or rangeof cells. Cells which value is either blank or a string or even an error message will considered. .br EXAMPLES: .br The return value of @MAX(1,4,3,5,4,3,6) is equal to 6. .br The return value of @MAX(A1:A5) is 5 if all cells in the range have the following values: A1=1,A2 and A3 are blank, A4="hello",A5=5.

FUNCTION - MIN
    .br SINTAX: .br @MIN(value1,value2,value3,...) .br @MIN(Cell1:Cell2) .br DESCRIPTION: .br This function returns the minor number included in the given list of arguments or rangeof cells. Cells which value is either blank or a string or even an error message will considered. .br EXAMPLES: .br The return value of @MIN(1,4,3,5,4,3,6) is equal to 6. .br The return value of @MIN(A1:A5) is 1 if all cells in the range have the following values: A1=1,A2 and A3 are blank, A4="hello",A5=5.

  Help System
The user contacts with abacus help system essentially by three ways: Invoking help in help menu... .br If the user clicks in help menu there will appear a drop menu with the following items: "Help...","Web page...","Search..." and "About...". By choosing "Help..." there will appear an Help Window where the user may search for a main topic ( by using the "Topics..." drop button the user is able to see the list available) or serach for a string in the text choosen by using the search box bellow the text window,(by using the bottom buttons "UP" and "DOWN" for navigation through the found strings).

Message box in the toolbar... .br At the toolbar there is a space destined to feed-back the user with it's actions.Those help messages are supposed to avoid that the user feels lost when using the toolbar or to inform the user of the errors.

Invoking a WWW browser to see ABACUS HOMEPAGE... .br If whished by clicking in help menu there will appear a drop menu with the following items: "Help...","Web page...","Search..." and "About...". By choosing "Web page..." abacus will launch yourfavorite browser in order to get the most recent Abacus homepage. There, among other things, you will have further informations about the project, or a recent FAQ that may help you with abacus.

  Cells
SUPORTED TYPES... .br A cell can either save values, (integers and floats), or formulas or even strings.

NUMERICAL FORMATS AVAILABLE... .br

Fixed format:
    123 - 123.4 - 123.12 ...

Scientific format:
    1.3E-12 - 1E-1 ...

Currency format:
    $123 - $123.1 - $123.45

Percentage format:
    12% - 12.2% - 12.23%

Time format:
    DD-MMM-YY HH:MM:SS | DD-MMM-YY HH:MM

Date format:
    MM/DD/YY - DD/MM/YY - DD-MMM-YY - DD-MMM - MMM-YY

STYLES... .br There are available four styles in the toolbar at radio buttons. A cell can have the styles : normal, bold, italic and italic-bold.

POSITIONS... .br There are three types of placement: centered, right and left.

SIZES... .br Width of columns and height of rows may be changed with the toolbar's option Format::Columns or Format::Rows.

COLORS... .br The user can choose among several colors (specially grey) what should be the selected cell color,(by default it is white).

FONTS... .br Several fonts are available for use at the toolbar. It can be changed the text font of each cell or selection.

SELECTION... .br By right-clicking the mouse we can select a cell,and if we move while pressing that mouse button we will be able to select a range, if we want to select the entyre column or label we just need to click in the label of the column or row desired. Several operations can be used in these selection such as: copy and paste ; graphics ; format ; sort ,etc...

  Main Commands
The great majority of these following commands are also available as buttons at the toolbar (if you have doubts about each button just move the cursor over it and a quick help is available in the help box. File... .br New - Opens a new abacus window with a new blank sheet. .br Open - Opens a desired *.wk1 sheet. .br Close - Closes the active sheet without exiting abacus if there is other sheet open. .br Save - Saves the active sheet in a file. .br Save as - Saves the active sheet in a file with a new desired name. .br Import - This command is used to import a file into an abacus sheet. Cells are filled according to the choosed method.If "Comma separated values" is chosen for instance the file 2,4,5,6,7 will be imported to abacus filling five adjacent cells with the respective values 2 4 5 6 7 .Other methods are avilable : "TAB separated values","Space separated values" and "Semicolon Separated values". .br Export - Supported export methods:"Comma separated values";"TAB separated values";"Space separated values"; "Semicolon separated values";TinySheet format"(for palmpilot);"Encapsulated PostScript". The user may also decide to export formulas or simply their results. .br Printing - Prints the active sheet as PostScript(or saves it as a .ps file).The user before printing may preview it. .br Print Setup - Several configuration details for Printing are available in this option so that the user may change it. .br

Edit... .br Undo - Undoes changes in the past. Each press on the undo button undoes the most recent change. .br Redo - Redoes undo change. .br Copy - If there is a cell selected or a range or even a set of rows or columns it copies their values into buffer. .br Move - .br Paste - Places in the selected area of canvas the values copied into buffer. .br Paste Special - .br Insert - ables the user to insert a column or a row. All those new cells are empty. .br Delete - deletes the contents of a selected cell or range of cells. If a set of columns or rows are selected it completely removes them from the sheet. .br Find - Ables the user to find a given string in the sheet. .br Replace - Ables the user to replace a string for other in the sheet. .br

View... .br View Cell borders - This ables the user to able or disable the blue grid around the cells. .br View Page Bordes - This ables the user to able or disable the red grid around the visible pages in the sheet. This is used to give an idea of what area in the sheet represents the printing pages. .br

Format... .br Fonts - This option ables the user to change font's: family (times,new century schoolbook,helvetica,courier), size, and shape(bold,normal,oblique,italic). .br Columns - If a column or a set of columns is selected this option ables to change those columns width, else it ables to change the weidth of the active's cell column. .br Rows - If a row or a set of rows is selected this option ables to change those rows heights, else it ables to change the height of the active's cell row. .br Sheet -

Tools... .br Sort - Sorts a selection of cells in any desired order.(Plenty of sort ways are available). .br Recalculation - .br Edit Script - Launches your favourite editor in order to create a tcl scripting file to be run in the spreadsheet. .br Run Script - Runs a desired pre-made script. .br

Graph.. .br New - When a range of cells is selected it ables the user to choose among six diferent types of graphics (Pie,Explode Pie,Line,Bar,Stacked Bar,XY) ,he just have to click the right button of the mouse in the canvas in orther to indicate the begining corner's position and one second time to indicate the end corner's position and the graphic is drawn.. .br Edit - Ables the user to select, move and resize visually the graphics just by using the left mouse button. .br Delete - Deletes the Selected graphic. It is chosen by Edit. .br

help... .br Help - Opens an help window displaying this man page. .br Web Page - Launches the user's favourite Web Browser in orther to browse in the most recent abacus home page. .br Search - Opens an help window where the user might search for help about a certain topic. .br About - Opens an help window displaying some detailed information about "abacus" project. .br

AUTHORS
Arlindo Oliveira <aml@algos.inesc.pt > .br Antonio Rendas <arendas@mail.telepac.pt > .br Vasco Amaral <vmma@mail.telepac.pt > To contact the project: If you have any ideas/suggestions you can think of send us mail to aml@algos.inesc.pt

and we promise we'll try to answer all letters we get.

SEE ALSO
tk(1) Help page last revised on $Date: 1998/10/08 $