Writing the data into a file

To write the data to a file, expand the Output Result To listbox and click File.

Type the file path into the File Name listbox. (The file path is a string, so type the string using the format appropriate for your macro format, either basic or advanced). Or, click Browse to browse for the file. NOTE: You must specify a complete file path and file name in this field, including the drive letter if any (for example, c:\Documents and Settings\User1\output.txt).

In the File Type listbox, click the type of file in which you want to store the data. This listbox lists the same database file types that are available in the Database On-Demand client.
  • When the file type is HTML, Z and I Emulator for Web has additional display options (such as table border, cell spacing, column headings, and so on) that you cannot directly access in the Macro Editor. However, you can include these options in your macro by launching the SQL Wizard, changing the HTML options (by clicking Settings on the Output tab of the SQL Wizard), and saving the SQL statement to the macro (see Using the SQL Wizard).
  • When the file type is XML, Z and I Emulator for Web has an additional option (character encoding) that you cannot directly access in the Macro Editor. However, you can include this option in your macro by launching the SQL Wizard, changing the XML options (by clicking Settings on the Output tab of the SQL Wizard), and saving the SQL statement to the macro (see Using the SQL Wizard).

Click Overwrite to overwrite the contents of an existing file, or click Append to append the data to an existing file. If the file does not exist, then either Overwrite or Append creates the new file.

If you select the Show in Web browser checkbox, Z and I Emulator for Web first writes the data into the file and closes the file, and then displays the file in the default browser. The browser must have the plug-in (for example, an Excel plug-in) for the file type (such as Microsoft Excel BIFF3 or BIFF4). For some browsers, you must configure the security settings of the browser to allow a Java applet or application to launch an instance of the browser to display a local file (see Configuring a browser to display a local file in the online help).