Professional Documents
Culture Documents
Spreadsheet Library
by
25-June-1998
DISCLAIMERS
The library is provided 'as is' and is subject to change without notice.
No warranty of any kind is made with regard to the software or documentation.
The author shall not be liable for any incidental error or consequential
damages in connection with the software and/or the documentation.
Permission to freely distribute this software is granted provided this manual
is distributed with it without any modification.
XCELL48 v2.0 can't be used for any commercial purpose without written
permission from the author. This implies the user should not be charged
for the use of XCELL48 v2.0 in any way.
Please excuse all the linguistic errors in this text. English is not
my native language (Spanish).
First of all you must install FNT1 (from the Universal Font Library) in your
calculator. If you use FNT3 you don't need to install FNT1.
A copy of the last version of UFL can be found at
http://www.engr.uvic.ca/~aschoorl/ufl/
4. Press 0 (or any other port number you can access) and [STO].
COMANDS
- The cells
Once you're inside the sheet you can move around with the cursor keys
and extract, copy, import, paste, delete and examine data with the
following keys:
Not shifted
Left Shifted
Right Shifted
- When you exit, you are asked for a name. The data will be stored in the
current directory in the named var. If you want to open the
sheet you just have to press the menu key corresponding to that sheet.
This way you can store multiple sheets in different directories and have
a quick access to any of them
- When you make a relative copy and you want to refer the same cell in
each new formula, you can do it by writing $ before the cell name.
For example:
A1=1 B1='$A1+2*A1'
A2=2
A3=3
COPY B1 THROUGH B3
A1=1 B1='$A1+2*A1'
A2=2 B2='$A1+2*A2'
A3=3 B3='$A1+2*A3'
It's important to note that EXCEL will only save formulas when
they are shown in the cells. To do this you must choose TOOLS
from the tool bar, choose OPTIONS, select the VIEW window and
check FORMULAS. Now the formulas are shown and you can save them
to a text with tabulators file and export the sheet to the HP48.
XCELL48 always saves formulas in text. This way you can fully
work on EXCEL with an XCELL48 sheet and vice-versa as long the
commands and functions are compatible. If you want to use a sheet
with formulas from one program in another program, you would only
be able to use the formula with compatible functions. For example,
you won't have any problem to use formulas with *, /, + and - (as
well as other functions as SIN, COS,...) because they exist in both
programs. But if you try to use STDV(A1:A10) from EXCEL in XCELL48
you won't be able, just because this function doesn't exist in the
HP48.
- You can now put User Defined Functions (UDF) into formulas. The UDF are
very powerful and are unlimited, as each user can create the UDF he needs
for every sheet. You can create an UDF by typing at the command line
outside XCELL48 (for example):
This is the formula of the Standard Deviation for 2 values. If you now type
DEFINE, you'll create an UDF. If you put it now in a formula (from inside
XCELL48), for example 'STDV(A1,A2)' you'll get the same result as if you use
the internal STDV with A1 and A2.
Another interesting example: You take the value (real) of a cell and want to
round it to the upper integer if its fractional part is bigger than 0.49 and
to the lower integer if it is less than 0.5. This can be easily done with the
function RND, but if you want to add 100 to the number if it has been rounded
to the upper value and 10 if it's been rounded to the lower you can't do this
with RND. One way to do this is using the IFTE (IF Then Else) function and
creating an User Defined Function (UDF). This function (IFTE) has a condition
and two algebraics. Depending on the result of the conditional part it
evaluates one algebraic or the other. It would be like this:
Now imagine the cell you want to operate on is A1, then: 'RND2(A1)'
and that's all! Easy enough? You may ask: why don't we put all the IFTE inside
a formula directly changing the X for the cell name without creating an UDF?
The fact is that the IFTE funtion nests 2 algebraics inside another one and
XCELL48 can't work with algebraics nested two or more levels depth.
You can create as many UDF as you need and for any purpose you want. Consult
the User Manual of the HP48 for more info on UDF and IFTE.
- You can use a program from inside a formula as long the program doesn't
take any argument and returns only one value. For example, if you've got a
program like this << 33 SF >> (that sets the user flag 33) and store it
in the variable 'AB' you can eval it by 'A1-A1+AB'. In this case as you don't
want the program to do anything, you must put a 0 inside the program
<< 33 SF 0 >> in order to have the formula correctly evaluated ('A1-A1+0' =0)
You can use a program taking one argument as long as the program returns two
values. For example you can use a program that took a number and depending on
the number returned one thing or another:
<< IF 1 == THEN 1 ELSE 100 END 0 >> this program is named 'AB'. If you enter a
formula like this 'A1+AB', when A1=1 then the formula will be 1, but if A1<>1
then the formula will be 100. This happens because the formula is evaluated in
RPN notation, first A1, then AB and at last +. When the AB program is evaluated,
A1 is already in the stack.
As you can see this is very flexible and allows you to do almost everything
you want, but the library doesn't check if the program accomplishes the two
conditions, so use this feature carefully!!
- The UNDO/REDO feature takes up a lot of memory and time if the sheet is big.
So if you are running out of memory or the sheet is so big that the undo
slows it a lot, the best thing you can do is to disable it by pressing
[LS][EVAL]. Once disabled, it will remain like that until you enable it, no
matter if you exit the sheet (as long as you save it).
- You can use any function in the formulas like IP (integer part), FP (fractional
part), CEIL and many, many more. The only function you can't use is the IFTE
function if it contains algebraics, because the formulas are parsed in only 1
level depth and the IFTE function nests algebraics in two level depth. You can
use it in this case for example:
A1=1 B1='IFTE(A1==1,1,100)'
here the result will be 1 except if A1<>1. If you need to use the IFTE function
putting algebraics inside of it you can make it through a User Defined Function
- XCELL48 can handle very large sheets (I've tested up to 50x50) with no or
little lost of performance except if it has to recalculate big amounts of
data.
- The library has been developed on a HP48SX with the RPL48 v1.12b
DEVELOPMENT PACKAGE, the DEBUGGER 1.0b and ED.
It is completely written in Sys-RPL and Machine Language.
It makes use of many "unsupported" entries. Use it at your own
risk. It has been working fine on a HP48SX revision J and on
a HP48GX revision R and nothing wrong has happened. However, remember
to backup your memory before using it.
- Library is ID 1220. Its size is 12188 bytes and its checksum is #F3DCh.
- Now there's only one way to enter data. You can enter whatever
(just like in the command line) and when you press [ENTER] it
will be parsed to one of the 4 types of objects the program
handles (real, complex, formulas and character strings)
- Faster scrollings
- Now there is the possibility to put User Defined Funtions into formulas
- Now you can eval a program from inside a formula as long the program
doesn't take any argument and returns only one value.
- More than the %90 of the routines of the library have been rewritten.
There are more than 2 kb's of ML routines for speed
- New routines for EXTRACT and IMPORT (the way to copy and paste). Now
can deal with cells, rows or columns and blocks, and are much faster.
Import is now much safer thanks to a new type_of_object test
- New routines for COPY that speeds it up many times
- New routines for TOTAL, MEAN and STANDARD DEVIATION much shorter and
faster (new algorithms, thanks Dominique...)
- Now the sheets are limited up to 26 columns (A...Z, to avoid any type
of problem with the column names) but the number of rows is limited only
by available memory.
- There is also a new small feature: each time the data list is updated
the busy annunciator winks. This way you know that anything is happening
while autoevaluations, row or column adding/deleting, copying cells or
importing data.
- The library is %100 backwards compatible from version 1.0 to version 2.0
as long as the sheet doesn't contains any program (only 1.0 sheets)
- When you lose a reference (for example if you have A2=A1+1 and you
purge column 1 then A1=@1+1) the strange name (@1) is changed for an error
delimiter (#!) and an error is generated as output for the formula.
ACKNOWLEDGEMENTS
- Nathanael J. Morriss for the %100 assembly display routines and many, many
talks. It's because of you that this new version exists. Thanks for forcing
me to learn ML.
- Detlef Mueller and Raymond Hellstern for RPL48
- Mika Heiskanen for DEBUGGER and ED
- Manuel Jaumar for letting me his HP48GX (R) for alpha days (when alpha tends
to infinite...)
- Al Arduengo for his kindness, courage, enthusiasm and exAL that
started everything
- Reuben F. Burch for beta testing and MS EXCEL help
- Dominique RODRIGUEZ for beta testing and suggestions (new STDEV formula)
- Othniel Rawlins for beta testing and suggestions
- Maj Chris McCormack for his help with this documentation (grammar/spelling)
- Duncan Cochran for his millions of suggestions (many of them implemented in
this new version) and betatesting
- David Hanon for betatesting and suggestions
- Luiz Sergio Sieber Padilla for betatesting
- Virgilio Rueda Cadena for betatesting
- HP for HP48 and TOOLS
As I explained in the DISCLAIMERS part, this software is freeware,
but many hours (and days...) of programming and debugging have been
invested in developing this library. So, the author will be much more
than satisfied if someone tells him that he appreciates the library
and he uses it a lot. The author will also be glad to solve (or at least,
try to...) all the problems that you can have using XCELL48.
PHONE: + 34 93 330 78 42
FAX: + 34 93 377 15 14
E-mail: corma@sefes.es