XCELL48 V1.3 Spreadsheet Library by Daniel Lopez Sancho 20-June-1997 DISCLAIMERS The library is provided 'as it' 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 v1.3 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 v1.3 in any way. Please excuse all the linguistic errors in this text. English is not my native language (Spanish). INSTALLING THE LIBRARY 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 UFL101.zip can be found at http://www.engr.uvic.ca/~aschoorl/ufl/ 1. Upload to your 48 the file XCELL48v13.lib with Kermit, Usend, XYModem or any other transfer protocol. Remember to use binary transfer. 2. Recall the contents of XCELL48v13.lib to the stack ( 'XCELL48v13.lib' [RCL] ). 3. Purge XCELL48v13.lib to save memory. 4. Press 0 (or any other port number you can access) and [STO]. 5. Turn off and on your machine (or restart it by pressing [ON]+[C]). Now your LIBRARY menu will contain the next label: [XCELL] COMANDS - [XCELL] starts the sheet - [ABOUTXCELL48] displays some info WORKING WITH XCELL48 The sheet has a graphical interface similar to any other spreadsheet program. It has 3 parts: - The ImputLine, where you can enter and edit data, you can be asked for actions and some cell info is showed - The row and column delimiters - The cells Once you're inside the sheet you can move around with the cursor keys and extract, copy, import, cut, paste, delete and examine data with the following keys: Not shifted - [A] Shows 'about' message - [B] Extracts data to stack from cell THROUGH cell (only values, no formulas) The extracted data can be: - real, complex or character string - a symbolic vector delimited by {} - a symbolic matrix delimited by {{}} - [C] Relative copy of cell from cell THROUGH cell - [D] Makes total SUM (relative) of data contained in SigmaDat (not the standard SigmaDAT but XCELL48's SigmaDat) and puts the result in the current cell - [E] Makes the MEAN (relative) of SigmaDat - [F] Makes the SDEV (relative) of SigmaDat - [CST] Shows STATUS PAGE with info on flags and properties of the sheet - [NXT] Shows a two page HELP - ['] Enter formula (Ex. 'A1*B1+C2') - [STO] Saves the sheet without leaving - [ENTER] Copies current cell to stack (with formulas and values) - [+/-] Changes cursor's movement after entering data from left->right to up->down - [DEL] Deletes from cell THROUGH cell - [<-] Imports data from stack (level 1) to current cell. Data can be: - real, complex, character string or formula - a real matrix delimited by {{}} - a symbolic matrix delimited by {{}} - a character string containing data ordered by tabulators This is useful for importing data from another spreadsheet program that supports data ordered by tabulators (like EXCEL or LOTUS 1-2-3) - [.] ... [9] Enter number to current cell (it can have more than one figure) - [ALPHA] Enter character string to current cell. String will be parsed to a real, complex or formula if it's possible, so this is a 'general' way of entering data - [/] Changes between 'show formulas' and 'don't show formulas' mode. When in 'show formulas' mode the Imputline shows the formula (if any) of the value in the current cell. When in 'don't show formulas' mode the Imputline shows the value itself. This is useful when formulas are very long, because they must be converted to strings and this slows scrolling a lot. It can be useful too for viewing values longer than the cell dimensions - [*] Toggles the position mark - [-] Inserts row at cursor position - [+] Inserts column at cursor position - [ON] Exits the sheet (you are asked to save or not the sheet) - CURSORS Left Shifted - [MTH] Print/export data (character string) to 'name_of_the_sheet.txt' Data will be ordered by tabulators and formulas will be changed from 'A1+5' to =A1+5. This way you can open the file from EXCEL and use the sheet with its formulas. Before opening it from EXCEL remember to transfer it in ASCII mode and to delete the string delimiters ("") once in the PC (with EDIT or another ASCII editor). If you want to print the sheet you can print it from EXCEL or directly print the file from HP48 (be sure to have cells smaller than 7 chars to maintain table aspect) - [TAN] Purges SigmaDat - [+/-] Edits current cell - [/] Enter complex to current cell - [-] Deletes row at cursor position - [+] Deletes column at cursor position - [8] Change between BARS and POINTS plot mode - [0] Sets STD mode - [2] Sets FIX2 mode - [3] Sets FIX3 mode Right Shifted - [TAN] Adds current cell to SigmaDat This way you can select a number of cells and then SUM, MEAN or SDEV them with [D], [E] or [F] - [8] PLOTS X (BARS mode) or X, Y (POINTS mode). Data must be on the stack and in the following order: X Y. Data is selected with the EXTRACT function ([B]) and you must extract first X and then extract Y Once in the PLOT menu you have the standard keys of the graphic menu. When plotting POINTS, you can adjust them to a line by pressing [FCN] or [STATL] (if S or G calculator), and then you can [FCN] and ROOT, ISECT, SLOPE, AREA, EXTR, EXIT, F(X), F' and NXEQ. If you press NXEQ you will see the equation of the adjusted line, so this is a good way to make a linear regression - [*] Jump to position mark - [/] Changes between 'values' and 'formulas' mode. In 'values' mode the values of the formulas are displayed and in 'formulas' the formulas themselves are displayed. When in 'formulas' mode the Imputline shows the value of the formula in the current cell. - [ON] Turns off the machine without leaving - [-] decreases the number of columns displayed (but increases width of cells) - [+] increases the number of columns displayed (but decreases width of cells) You can see a maximun of 6 columns and a minimun of 1. Maximun number of columns displayed is limited by the existing number of columns but minimun number of columns is not limited in any way FINAL REMARKS - When you exit or STO the sheet, 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' - You can extract a part of the sheet as a matrix of list and leave it in the stack. This way is easy to operate it with many programs like ALG, Math, QPI or visualize it with Java. If you press [B] and select the data, it will be leaved as a matrix of values (reals or complex), but if you press [LS][B] you'll get the matrix of formulas. - Now XCELL48 is compatible with any program that accepts text data ordered by tabulators like MS EXCEL, LOTUS 1-2-3 or Minitab. You can export data from PC to HP and vice versa. To export data press [LS][MTH] and transfer the file .txt created with the name of the sheet to the PC in ASCII mode. Edit the PC file and delete the string delimiters (""). Open file from the program to be used (it has been tested only on MS EXCEL (but LOTUS 1-2-3 can open text files and MS EXCEL files). To import data, save the sheet on the PC as Text with tabulators and EDIT it to add string delimiters (""). Transfer it to the HP in ASCII mode. Put it in the stack and open a new sheet ([XCELL]) or an existing sheet where you want to insert data. Now, import data with [<-] It's important to note than EXCEL only save formulas when they are showed in the cells. To do that you must choose TOOLS from the tool bar, choose OPTIONS, select the VIEW window and check FORMULAS. Now the formulas are showed and you can save them to a text with tabulators file and export the sheet to the HP48. XCELL48 always save formulas in text. This way you can fully work on EXCEL with an XCELL48 sheet and vice-versa. - You can use XCELL48 as a SYMBOLIC MATRIX WRITER setting the display mode to 'formulas' ([RS][/]) and then extracting the rows and columns ([LS][B]). If you want to edit or visualize a symbolic matrix just put it on the stack launch XCELL and import the matrix ([<-]). This way you can use all the copy, extract, paste and edit capabilities of XCELL48 to work with symbolic matrix - There's no RAD/DEG or RECT/POLAR change from inside the program. They're selected at the start of the sheet (it takes the values you've actually selected) and you cannot change them afterwards - Can handle very large sheets (I've tested up to 50x50) with no or little lost of performance except when it has to calculate relative cells. The library is quite functional but if you try very large sheets, it will slow things a lot. That's because it has tons of calculations to do and Sys-RPL is not as fast as ML. Any volunteer to translate about 1.5 Kb's from Sys-RPL to ML? - 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. 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 12459.5 bytes and its checksum is #3F5Bh. CHANGES FROM version 1.0 - Eight rows display - 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 compiled to one of the 4 types of objects the program handles (real, complex, formulas and character strings) - It doesn't support programs in cells anymore. It wasn't very useful and made trouble with some of the new features - There's a variable number of columns from one to six. You can change it with [RS][-] and [RS][+] - You can extract a part of the sheet as a matrix of list and leave it in the stack (useful if you want to use XCELL as a symbolic matrix writer). - Now you can import data from the stack (like the matrix of list above) and insert it at any cell with [<-] - Now XCELL48 is compatible with any program that accepts text data ordered by tabulators like MS EXCEL, LOTUS 1-2-3 or Minitab. - Now you can print data or use EXCEL to print it - New COPY and EXTRACT routines - Now when a cell is empty it will be treated as if it was 0 - Some bugs have been fixed: - If you entered A1='A2+1' and A2='A1+1' then you used to get an infinite loop. Now it's fixed - If you deleted a row or column with its first element being used in another cell, it crashed up. Now it's fixed - It is compatible with sheets of previous versions, but make sure they don't have programs inside! - It takes 700 bytes less than the previous version!! ACKNOWLEDGEMENTS I would like to thank the following persons: - Detlef Mueller and Raymond Hellstern for RPL48 - Mika Heiskanen for DEBUGGER and ED - Manuel Jaumar for letting me his HP48GX (R) for a complete month - Al Arduengo for his kindness, courage, enthusiasm and exAL that started everything - Reuben F. Burch for beta testing and MS EXCEL help - Nathanael J. Morriss for beta testing (I'm waiting for your news) - Dominique RODRIGUEZ for beta testing and suggestions - Othniel Rawlins for beta testing and suggestions - 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 find using XCELL48. You can contact me by: POST: Daniel Lopez Sancho c/ Gran Via Carles III, 67 4 2 08028 BARCELONA SPAIN PHONE: + 93 - 330 78 42 FAX: + 93 - 377 15 14 E-mail: corma@sefes.es I will try to answer all doubts I receive.