|
![]() |
![]() |
ADDIN Calls an EventAddIn with optional data. ADDIN(name[, data...]) name the name of an EventAddIn data the [optional] data to be passed to the AddIn This function calls the EventAddIn name, optionally passing it the specified data. The name name must be expressed as a string. Returns: the return value from the AddIn addin("MyAddIn") ALERT Opens an alert panel. ALERT(title, message[, button1[, button2[, button3]]]) title the title of the alert panel message the message of the alert panel button n the titles of the buttons This function opens an alert panel with the title, message, and button s specified. The title, message, and button n names must be strings. If no buttons are specified, one button will appear, labeled OK. Returns: the number of the button pressed, with the first button numbered 0 alert("Warning","The number entered exceeds the maximum.", "Redo","Accept") DISPLAY Re-displays the worksheet. DISPLAY() This function redisplays the worksheet. By default, the sheet is only re-displayed at the end of a script. This is useful for re-displaying the worksheet during the execution of a long script. Returns: 0 display() FREEZE Freezes the value of a cell reference. FREEZE(value) value any cell reference This function returns the current value of cell. This is useful for assignment of the value in a cell to a local variable. Returns: the current value of value b1 := freeze(a1) ?x := freeze(g7) INVERT Inverts a matrix. INVERT(range, dest) range any worksheet range representing a matrix dest the destination of the inverted matrix This function inverts the matrix in range and places the inverse in dest. Both ranges must be square and of the same size. Returns: 0 if successful and -1 if unsuccessful invert(a1:c3,d1:f3) invert(mymatrix,g7:j10) LET Assigns a value to a variable. LET(variable, value) variable a variable name value a number, string, label, or cell reference This function sets a variable to a value. The variable must be expressed as a string. Variables can also be assigned with the := operator. Returns: value LET("?x",10). % is the same as ?x := 10 MENU Displays a menu of choices. MENU(range[, MENUBYROW|MENUBYCOL]) This function gives the user a menu of choices. If MENUBYCOL is used (this is default), for each column in range, the first row is the short name, the second row is the long description, and the third row is the string to return (this can be used for a subsequent "Goto..." or "gosub"). If MENUBYROW is used, the orientation of the table is horizontal rather than vertical. Returns: the return string, or -1 if the Cancel button is clicked ?foo := menu(a1:c3,MENUBYROW) MULTIPLY Multiplies two matrices. MULTIPLY(Xrange, YRange, dest) XRange a worksheet range representing a matrix YRange a worksheet range representing a matrix dest the destination range This function multiplies the two matrices specified by XRange and YRange and places the result in dest. Returns: 0 if successful and -1 if unsuccessful multiply(A1:C3,E1:F3,H1:I3) Prints a report or a part of the worksheet. PRINT([range]) or PRINT([report]) This function prints the range or the report specified. Report names must be expressed as strings. If nothing is specified, PRINT() will print all the information on the sheet. Returns: 1 if success, -1 if failure print() print("MyReport") print(a1:g27) PROMPT Prompts the user for input. PROMPT(text) text the user prompt string This function prompts the user for input with the string text. The message text must be expressed as a string. Returns: the user's input, as a string a1 := prompt("Type in any word.") a2 := value(prompt("Type in any number")) RECALC Recalculates the worksheet. RECALC(), RECALC(cell) or RECALC(range) This function recalculates the range or, if no range is specified, the whole worksheet. Returns: cell or range recalc() recalc(b7:z99) REGRESSION Performs a linear regression on the specified ranges. REGRESSION(Xrange, YRange, dest) XRange a worksheet range representing a matrix YRange a worksheet range representing a matrix dest the destination range Performs linear regression on the input ranges specified by XRange and YRange and places the result in the range dest. Returns: 0 if successful and -1 if unsuccessful regression(A1:C3,D1:D3,F1:F3) REPORT Prints a specified report. REPORT(name) name the name of a report This function prints the pre-defined report name. name must be expressed as a string. The report must first be defined in the Report Layout Inspector. For more information about reports, see "Report Layout Inspector" . Returns: 0 report("myreport") report(c18) SCENARIO Runs a scenario. SCENARIO(name) name the scenario name This function runs the predefined scenario name. Name must be expressed as a string. The scenario must first be defined in the Scenario Inspector. For more information about scenarios, see "Scenario Inspector" . Returns: 0 scenario("myscenario") scenaro(c9) SETADDRESS Sets the cell address for the macro execution. SETADDRESS(cell) This function sets the address of the cell that the macro is executing in. This is useful for the SAME() command. The default is A1. setaddress(g17) SETINPUT Sets the input of a specified cell. SETINPUT(cell, string) cell any cell reference string a string This function sets the input of the cell cell to string. The string will be interpreted by the cell as if typed by the user. the evaluated string setinput(c1,"=a1+b1") SETLABEL Assigns a label name to a range of cells. SETLABEL(label, range) label any string range any worksheet range This function assigns range to the name label. label must be expressed as a string. Returns: 0 setlabel("myrange",a1:g13) SETPROTECTION Sets the protection for a given range. SETPROTECTION(range,TRUE|FALSE) SOLVE Finds an input value such that a specified formula will give a desired result. SOLVE(var, comp, value[, prec]) var any cell reference comp any cell reference containing a formula value the desired result prec the [optional] digits of precision This function tries to find the correct value of the cell var such that the formula in comp yields value (a number). It places the result in var. Optionally, the number of digits of precision can be specified with prec. The default is 6. Returns: 0 if successful, -1 if not solve(A1,B1,2.5) solve(A1,B1,2.5,8) SORT Sorts a range. SORT(range, titles, SORTBYROW | SORTBYCOL, key1, sorttype[, key2, sorttype[, key3, sorttype]]) range any worksheet range titles a boolean stating if the range has titles key n the offset of the column to sort by sorttype a sort-type constant (see below) This functions sorts the given range. If titles is true, the top row of the range is ignored. To sort by rows, use the SORTBYROW constant; to sort by columns, use the SORTBYCOL constant. The key is the number of rows or columns that the key row or column is offset from the top or left side of the range. Use ASCENDINGSORT or DESCENDINGSORT to specify the order of the sort. key2 and key3 are optional. Returns: 0 sort(a1:b10,false,SORTBYROW,0,ASCENDINGSORT) SYSTEM Sends a string to the shell. SYSTEM(string) string any string that can be interpreted by the shell This function sends the string string to the shell for execution. Returns: the return value of the shell command a1 := system("whoami") |
||
|
||