


The following procedure describes how to access your COBOL data from Microsoft Excel 2000, the spreadsheet component of Microsoft Office 2000. Another procedure has been provided for users of Excel 97 (the version that came with Microsoft Office 97). If you have a different version of Excel, follow whichever procedure you desire. Even though your steps may be slightly different, the concepts will be largely the same.
To access data from Excel 2000:
1. Start Excel.
2. Select Add-Ins from the Tools menu. To locate the "Add-Ins" option, point to the expansion arrows on the bottom of the Tools menu.
3. In the Add-Ins dialog box, select the MS Query Add-In check box, and click OK. If this add-in does not appear on your list, reinstall Excel, being sure to select "MS Query" from the list of functions to install.
4. Point to Get External Data on the Data menu, and then select New Database Query.
This starts Microsoft Query and opens the Choose Data Source dialog box.
If you want to use MS Query's "Query Wizard" to create your SQL query, leave the "Use Query Wizard" check box selected. Refer to MS Query's online documentation for instructions on using the Query Wizard.
For simplicity, clear the Query Wizard check box.
5. Select the DSN that corresponds to the data source you want to access and click OK. (Refer to section 3.1, "Data Source Names (DSNs)" for instructions on creating DSNs.) If you want to use the sample DSN that comes with AcuODBC, select AcuODBC Datasource.
6. From the Add Tables dialog box, select the table or tables that you want to add (for example, "pets"), and click Add. Close the box when you're done.
For each table you selected, a list box is displayed on the MS Query screen. This list box lists all of the columns in the associated table.
7. Double-click each column that you want to read into your Excel spreadsheet, and that column is displayed on the screen, as in the following example. If you want to add all columns, double-click the "*" at the top of the list box. Proceed to step 8 if you would rather use an SQL query to populate the table.
8. To enter an SQL statement, click SQL on the button bar. In the SQL dialog box, type the SQL command you want to execute. Click OK when you're done. (For a description of the SQL commands supported by AcuODBC, refer to section 5.3, "SQL Syntax Supported by AcuODBC".)
9. Select Return Data to Microsoft Excel from the Microsoft Query File menu. A dialog box appears.
10. Select where to put the data, and then click OK. Click Properties to select further options.
You are returned to Excel. The data you selected is displayed in the current Excel spreadsheet.