AcuODBC User's Guide
4.1.2 Accessing Data From Excel 97 and 2000
The following procedure describes how to access your COBOL data from Microsoft Excel 97 and Excel 2000, the spreadsheet components of Microsoft Office 97 and Office 2000, respectively. If you have a different version of Excel, use the procedures shown here to get an idea of the concepts involved in accessing COBOL data from within an Excel spreadsheet, but be aware that your steps may be slightly different.
- Start Excel. Excel automatically opens a new spreadsheet.
- Select Add-Ins from the Tools menu. If your MS Office menus are set to "Show recently used commands first," you may need to click on the expansion arrows at the bottom of the Tools menu to see the Mail Merge option.
- In the Add-Ins dialog box, select one of the following:
- If you are using Excel 2000, 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.
- If you are using Excel 97, select ODBC Add-In. If this add-in does not appear on your list, you will need to reinstall Excel to add the ODBC component.
Highlight Get External Data on the Data menu.
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, deselect the Query Wizard check box.
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. 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.
Double-click each column that you want to read into your Excel spreadsheet, and that column is displayed on the screen. If you want to add all columns, double-click the "*" at the top of the list box.
- 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.")
Select Return Data to Microsoft Excel from the Microsoft Query File menu. A dialog box appears. 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.
Voice: (800) 262-6585 (U.S.A. and Canada)
Voice: (858) 689-4500
Fax: (858) 689-4550
Please share your comments on this manual
or on any Acucorp documentation with the
Acucorp Communications Department.
|© 1988-2003 Acucorp, Inc.|
All rights reserved.