{FileClose} closes all views of the active notebook; {FileCloseAll} closes all open notebooks. The optional argument DoSave? indicates whether to display a save prompt before closing files with changes. Use 1, the default, to prompt for changes; 0 suppresses save prompts.
Options
{FileClose <DoSave? (0|1)>} Closes all views of the active notebook
{FileCloseAll <DoSave? (0|1)>} Closes all open notebooks
{FileCombine} lets you copy all or part of a notebook into any area of the active notebook. If you use the "Copy" option, it copies all or part of a notebook into the active notebook (starting at the selected cell). Omit Blocks to combine an entire file. Use "Add," "Subtract," "Multiply," or "Divide" to perform mathematical operations; the incoming data operates on existing data.
You can use {FileCombine?} or {FileCombine!} to display the Combine Files dialog box. {FileCombine?} lets you manipulate the dialog box, whereas {FileCombine!} relies on the macro to manipulate it.
Parameters
Filename Name of the file to combine
Blocks Selection or selections within Filename to combine (optional)
Note
This command is obsolete.
{FileExit}
Syntax
{FileExit <DoSave?(0|1)>}
PerfectScript Syntax
FileExit ([DoSave?:Enumeration {Yes!; No!}])
Description
{FileExit} closes Quattro Pro. The optional argument DoSave? indicates whether to display a save prompt before closing files with changes. Use 1, the default, to prompt for changes; 0 suppresses save prompts.
Parameters
DoSave? Whether to display a save prompt for modified files: no (0), yes (1); 1 is the default
{FileExtract} saves part of a notebook to a separate file, leaving the original file intact. Use "Formulas" to retain formulas; use "Values" to convert formulas to values. The optional argument--"Replace," "Backup," or "Confirm"--indicates how to treat an existing file with the same name (without displaying a prompt).
You can use {FileExtract?} or {FileExtract!} to display the Extract To File dialog box. {FileExtract?} lets you manipulate the dialog box, whereas {FileExtract!} relies on the macro to manipulate it.
Parameters
Blocks Selection or selections to extract
Filename Name of the new file containing Blocks
{FileImport}
Syntax
{FileImport "Filename","ASCII Text File"|"Comma and "" Delimited File"|"Only Commas"|"Parse Expert"}
PerfectScript Syntax
FileImport (Filename:String; Method:String)
Description
{FileImport} copies a text file into the active sheet of a notebook. Enter the option string that describes the type of file to import.
You can use {FileImport?} or {FileImport!} to display the Text Import dialog box. {FileImport?} lets you manipulate the dialog box, whereas {FileImport!} relies on the macro to manipulate it.
{FileNew}
Syntax
{FileNew <TemplateName>}
PerfectScript Syntax
FileNew ([TemplateName:String])
Description
{FileNew} opens a blank notebook or a notebook based on a QuickTemplate.
You can use {FileNew?} or {FileNew!} to display the New File dialog box. {FileNew?} lets you manipulate the dialog box, whereas {FileNew!} relies on the macro to manipulate it.
FileNew opens only templates in the default QuickTemplates folder.
Example
The following macro opens a blank notebook:
{FileNew}
The following macro opens a new notebook based on the 7-Year Balloon Loan QuickTemplate:
{FileNew "7 Year Balloon Loan"}
Parameters
TemplateName The name of a QuickTemplate
{FileOpen}
Syntax
{FileOpen Filename,<"Open Supporting"|"Update References"|"None ", Open as Copy 0|1>}
You can use {FileOpen?} or {FileOpen!} to display the Open File dialog box. {FileOpen?} lets you manipulate the dialog box, whereas {FileOpen!} relies on the macro to manipulate it.
Parameters
Filename Name of the file to open.
Open as Copy Yes or No, (1 or 0), 0 is the default.
Note
¿ To open two or more URL files using Quattro Pro Native macros script, insert a {WAIT} statement after each {FileOpen} statement.
{FileRetrieve} loads a notebook into the active notebook, replacing any existing data there.
You can use {FileRetrieve?} or {FileRetrieve!} to display the Retrieve File dialog box. {FileRetrieve?} lets you manipulate the dialog box, whereas {FileRetrieve!} relies on the macro to manipulate it.
{FileSave} saves the active notebook, {FileSaveAll} saves all open notebooks, and {FileSaveAs} lets you save the active notebook under another name (Filename). The optional argument--"Replace," "Backup," or "Confirm"--indicates how to treat a previous version of the file (without displaying a prompt).
The optional <FileType> argument for {FileSaveAs} specifies the type of file to save and is equivalent to the Save File As Type option in the Save File dialog box. If you do not specify a file type, the default is "QPW v6."
You can use {FileSaveAs?} or {FileSaveAs!} to display the Save File dialog box. {FileSaveAs?} lets you manipulate the dialog box, whereas {FileSaveAs!} relies on the macro to manipulate it.
The following table shows the available file types. For file types with abbreviated names, a short description is provided.
File Types Description
QPW v7/v8 Quattro Pro for Windows, version 7.0 and 8.0
QPW v6 Quattro Pro for Windows, version 6.0
QPW Quattro Pro for Windows, version 1.0 and 5.0
QP/DOS Quattro Pro for DOS
Excel v5/v7 Excel, Version 5.0 and Version 7.0
Excel Excel, Version 4.0
1-2-3 v4/v5 1-2-3, Version 4 and Version 5
1-2-3 v3.x 1-2-3, Version 3x
1-2-3 v2.x 1-2-3, Version 2x
1-2-3 v1.0 1-2-3, Version 1.0
1-2-3 Ed. 1-2-3, Educational Version
Paradox
dBASE IV
dBASE III
dBASE II
Text tab-delimited text
DIF VisiCalc
SYLK Multiplan
HTML Hypertext Markup Language files, Version 3 (for distribution on the Internet's World Wide Web)
Example
To close all files and save without confirmation, use this macro:
{FileSaveAll Replace}
{FileCloseAll 0}
Options
{FileSave <Replace|Backup|Confirm>} Saves the notebook to the name under which you last saved it
{FileSaveAll <Replace|Backup|Confirm>} Saves the file over a previous version with the same name
{FileSaveAs Filename, <Replace | Backup | Confirm>,, <FileType>} Saves the notebook under a new name you specify
{FileSend}
Syntax
{FileSend <Filename>}
PerfectScript Syntax
FileSend ([Filename:String])
Description
{FileSend} lets you send notebook sheets via one of your mail systems.
Example
{FileSend MYSTATUS.WB3} sends the notebook MYSTATUS.WB3 to another user.
Options
{FileSend <Filename>} Sends selected text or an entire notebook by e-mail
{FILESIZE}
Syntax
{FILESIZE Location}
Description
{FILESIZE} calculates the number of bytes in a file previously opened using {OPEN} and places the result in Location as a value. If Location refers to cells, the result is placed in the upper-left cell of the cells. If the command is successful, macro execution continues in the cell below the cell containing the {FILESIZE} command, ignoring any other commands in that cell. If {FILESIZE} fails (for example, when no file is open), macro execution continues in the cell containing the {FILESIZE} command.
Example
The following example opens the file MYFILE.TXT and places its size (in bytes) in the cell named num_bytes.
\F {OPEN "MYFILE.TXT",R}
{FILESIZE num_bytes}
{CLOSE}
num_bytes 45
Parameters
Location Any cell address or cell name
Note
¿ This command is obsolete.
¿
{ FileVersion.Retrieve }
Syntax
{FileVersion.Retrieve Filename}
PerfectScript Syntax
FileVersion_Retrieve (Filename?:String)
Description
{FileVersion.Retrieve } retrieves any archived version of a file
{ FileVersion.Retrieve_Current }
Syntax
{FileVersion.Retrieve_Current}
PerfectScript Syntax
FileVersion_Retrieve_Current ()
Description
{FileVersion.Retrieve_Current} retrieves the most current version of the file.
{ FileVersionSave }
Syntax
{FileVersionSave}
PerfectScript Syntax
FileVersionSave ()
Description
{FileVersionSave} saves the current file as a different version.
{FLOATCOPY} lets you copy a floating object in the active notebook window. The item to copy is selected using {SELECTFLOAT}. The new position in {FLOATCOPY} is specified as a positive offset from a cell in the notebook.
To copy a floating chart to another notebook, specify a notebook as well as a cell for UpperCell.
Example
The following macro selects the floating chart Inserted1 and copies it to [SALES]A:C10.
{SELECTFLOAT Inserted1}
{FLOATCOPY [SALES]A:C10,0,0}
Parameters
UpperCell Cell containing the new upper-left corner of the floating object
xoffset Offset in twips from the left edge of UpperCell to the left edge of the floating object
yoffset Offset in twips from the top edge of UpperCell to the top edge of the floating object
{FLOATCREATE} lets you create macro buttons, floating charts, or a draw layer objects (lines, arrows, rectangles, rounded rectangles, ellipses, or text boxes) in the active notebook window. Use {CREATEOBJECT} to create objects in dialog windows or chart windows.
All positions in {FLOATCREATE} are positive offsets from cells in the notebook containing the upper-left and lower-right corners of the object.
Notes
If you need to modify the floating object after creating it, change the property settings immediately after creation. It is selected then, so you will not need to click it or use {SELECTFLOAT}.
You should also change the name at this time and document it for later use with {SELECTFLOAT}.
Example
The following macro creates a macro button that covers the cells A1..B2, then stores the name of the button in A26. The button reads Save File:
{FLOATCREATE Button,A1,0,0,C3,0,0, "Save File"}
{GETPROPERTY A26, "Object_Name"}
The following macro creates a button 50 twips to the right and 50 twips below the upper-left corner of the button in the previous example. It reads Open File:
The following macro creates a floating chart that is offset 35 twips from the cells C2..E10, but the same size:
{GraphNew Chart3}
{FLOATCREATE Chart,C2,35,35,E10,35,35,"Chart3"}
The following macro creates a floating arrow over the cells B8..Dll . The arrow starts at the southwest corner of the cells, and ends with an arrowhead at the northwest corner.
{FloatCreate Arrow,A:B8,0,0,A:D11,945,45,4}
The following macro creates a floating ellipse over the cells E10..E13, then fills the ellipse with a red color.
{FloatCreate Ellipse,A:E10,0,120,A:E13,945,240}
{Setproperty Fill_Color, "255,0,0"}
Parameters
Type Floating object to create: Chart, Button, Line, Arrow, Rect, Rounded_Rect, Ellipse, or Text
UpperCell Cell containing the upper-left corner of the chart or macro button
xoffset Offset in twips from the left edge of UpperCell to the left edge of the floating object
yoffset Offset in twips from the top edge of UpperCell to the top edge of the floating object
LowerCell Cell containing the lower-right corner of the chart or macro button
xoffset2 Offset in twips from the left edge of LowerCell to the right Edge of the floating object
yoffset2 Offset in twips from the top edge of LowerCell to the bottom edge of the floating object
Text For Chart, the named chart to display; for Button, the button text
StartCorner For Line or Arrow, a number representing the starting corner; 1 = northwest, 2 = northeast, 3 = southeast, 4 = southwest (for example, an arrow pointing up and to the right would have a StartCorner of 4) You must this value within quotations (""). ""
{FLOATMOVE} lets you move a floating object in the active notebook window. The item to move is selected using {SELECTFLOAT}. The new position in {FLOATMOVE} is specified as a positive offset from a cell in the notebook.
To move a floating chart to another notebook, specify a notebook as well as a cell for UpperCell.
Example
The following macro selects the floating chart Inserted1 and moves it to [SALES]A:C10.
{SELECTFLOAT Inserted1}
{FLOATMOVE [SALES]A:C10,0,0}
Parameters
UpperCell Cell containing the new upper-left corner of the floating object
xoffset Offset in twips from the left edge of UpperCell to the left edge of the floating object
yoffset Offset in twips from the top edge of UpperCell to the top edge of the floating object
{FloatOrder}
Syntax
{FloatOrder.Option}
PerfectScript Syntax
FloatOrder_Backward ()
FloatOrder_Forward ()
FloatOrder_ToBack ()
FloatOrder_ToFront ()
Description
{FloatOrder} works on selected objects to arrange layers of floating charts and other floating objects in the notebook window.
Options
{FloatOrder.ToBack} Send the selected object to the back layer
{FloatOrder.Backward} Send the selected object back one layer
{FloatOrder.ToFront} Send the selected object to the front layer
{FloatOrder.Forward} Send the selected object forward one layer
{FLOATSIZE} lets you resize a floating object in the active notebook window. The item to resize is selected using {SELECTFLOAT}.
All positions in {FLOATSIZE} are positive offsets from a cell in the notebook.
Parameters
UpperCell Cell containing the new upper-left corner of the chart or macro button
xoffset Offset in twips from the left edge of UpperCell to the left edge of the floating object
yoffset Offset in twips from the top edge of UpperCell to the top edge of the floating object
LowerCell Cell containing the new lower-right corner of the chart or macro button
xoffset2 Offset in twips from the left edge of LowerCell to the right edge of the floating object
yoffset2 Offset in twips from the top edge of LowerCell to the bottom edge of the floating object
{FLOATTEXT}
Syntax
{FLOATTEXT String}
PerfectScript Syntax
FloatText (String:String)
Description
{FLOATTEXT} replaces the text in the selected text box with the specified string. The text box can be on a notebook sheet or in a chart window.
Example
The following macro selects a floating text box named Text1 and replaces the text in it with "Quarterly Sales Report."
{SELECTFLOAT Text1}
{FLOATTEXT "Quarterly Sales Report"}
Parameters
String String of characters used to replace text in the text box
{FOR}
Syntax
{FOR CounterLoc,Start#,Stop#,Step#,StartLoc}
Description
{FOR} repeatedly runs a macro subroutine beginning at StartLoc, creating a macro loop. Quattro Pro keeps track of how long the macro runs using CounterLoc. At the start of the loop, CounterLoc is set to Start#. Each time an iteration of the loop runs, CounterLoc is increased by Step#. When CounterLoc reaches or exceeds Stop#, execution stops.
Example
{FOR D15,1,5,1,E30} runs the subroutine beginning in cell E30 five times.
{FOR D15,1,10,2,E30} runs the subroutine five times because the counter increments by two during each iteration.
{FOR D15,1,5,0,E30} runs the subroutine continuously until you press Ctrl+Break, because adding 0 to the start value of 1 can never make the counter exceed 5.
{FOR D15,1,0,1} results in an error because no subroutine is specified.
The following macro creates "Qtr" labels for reports; the year displays above Qtr1:
\Q {; position cursor where labels should appear}
{FOR counter, 1994,1997,1,_list}
{; return to original position}
{LEFT}{END}{LEFT}
counter
_list {PUTCELL +counter}
{DOWN}
{PUTCELL "Qtr1"}{RIGHT}
{PUTCELL "Qtr2"}{RIGHT}
{PUTCELL "Qtr3"}{RIGHT}
{PUTCELL "Qtr4"}{RIGHT 2}{UP}
Parameters
CounterLoc Cell used to track the number of macro iterations
Start# Initial value to place in CounterLoc
Stop# Maximum value for CounterLoc
Step# Amount added to CounterLoc after each iteration
StartLoc Cell containing the subroutine to run
Note
¿ This command is obsolete.
¿
{FORBREAK}
Description
{FORBREAK} cancels the subroutine run by a {FOR} command and ends the processing of {FOR}. Macro execution continues normally with the command following the {FOR} command.
If {FORBREAK} appears anywhere other than in a subroutine called by {FOR}, macro execution ends, and Quattro Pro displays an error message.
{FORBREAK} is usually used in conjunction with {IF} to exit the macro if a specific condition is reached; for example, if an error condition is found.
Example
The following example shows {FORBREAK} terminating a loop used to enter names into a list. Enter STOP to stop the loop.
\F {EditGoto list_top}
{FOR counter,1,10000,1,_get_name}
_get_name {GETLABEL "Enter next name: ",name_cell}
{IF name_cell="STOP"}{FORBREAK}
{LET @CELLPOINTER("Address"),name_cell}{DOWN}
name_cell STOP
counter 4
list_top
Note
¿ This command is obsolete.
¿
{Form}
Syntax
{Form <Block>}
PerfectScript Syntax
Form(Block?:<Block>)
Description
Equivalent to Tools Database Tools Form. Lets you create forms for entering and finding data records without programming.
Parameter
Block A database block including field labels and records
{FOURIER} performs a fast Fourier transformation on cells of data. {FOURIER} is equivalent to the Fourier analysis tool.
Parameters
InBlock One or more numeric cell values representing the input cells; can be real or complex numbers; the number of values in InBlock must be a power of 2 between 2 and 1024 inclusive (for example, 2, 4, 8, 16,...); if the number of values in InBlock does not equal a power of 2, pad the cells with additional zeros
OutBlock Upper-left cell of the output cells
Inverse 0 to perform a Fourier transformation; 1 to perform the inverse Fourier transformation; the default is 0
{Frequency}
Syntax
{Frequency.Option}
PerfectScript Syntax
Frequency_Bin_Block (Block:String)
Frequency_Go ()
Frequency_Reset ()
Frequency_Value_Block (Block:String)
Description
{Frequency} counts the number of cases in the value Block that fall within each interval specified in the bin Block. Use {Frequency.Bin_Block} and {Frequency.Value_Block}, then {Frequency.Go}. You can use {Frequency.Reset} before or after the other commands to clear current settings.
You can use {Frequency?} or {Frequency!} to display the Frequency Tables dialog box. {Frequency?} lets you manipulate the dialog box, whereas {Frequency!} relies on the macro to manipulate it.
Example
The following macro counts the data in cells C1..E13 of sheet A and groups it according to the intervals given in G1..G7; frequencies display in column H.
{Frequency.Value_Block A:C1..E13}
{Frequency.Bin_Block A:G1..G7}
{Frequency.Go}
Options
{Frequency.Bin_Block Block} Specifies cells that define value intervals or "bins" of values to be counted
{Frequency.Go} Accepts the frequency settings
{Frequency.Reset} Clears all settings
{Frequency.Value_Block Block} Specifies the cells or list of cells containing values to be counted