


The following procedure describes how to access your COBOL data from Excel 97, the spreadsheet component of Microsoft Office 97. Another procedure has been provided for users of Excel 2000 (the version that comes with Microsoft Office 2000). 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 97:
1. Start Excel.
2. Select Add-Ins from the Tools menu.
3. Select ODBC Add-In from the Add-Ins dialog box. If this add-in does not appear on your list, reinstall Excel.
4. From the Data Menu, select Get External Data and then select Create New Query.
This starts Microsoft Query, and opens the Choose Data Source window.
5. On the Databases tab, select the DSN that corresponds to the data source you want to access and click OK. For simplicity, make sure the Query Wizard check box is not selected. If you want to use the sample DSN that comes with AcuODBC, select AcuODBC Datasource.
The Microsoft Query window opens with the Add Tables dialog box active.
6. Select the table or tables that you want to add (for example, "pets"), and then 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 box lists all of the columns in the associated table.
7. Double-click each column that you want to read into your spreadsheet, and that column appears on the screen. 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 instead, click SQL. 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.
10. Indicate, in the Returning External Data to Microsoft Excel dialog box, where you want to put the data and click OK.
Microsoft Query returns you to Excel and adds the data from your ODBC data source to your spreadsheet.