Excel Tutorial 1: Accessing the CompuPlants Gold database and retrieving a list of plant codes and their names.
After starting Microsoft Excel to retrieve the CompuPlants Gold data select "Data\Get External Data\Create New Query" as shown in the picture below.

Then you will want to select the CompuPlants Gold Database which should be listed as "cpgold" in the list. If you do not see "cpgold" in the list you may need to browse to the "C:\Program Files\Common Files\ODBC\Data Sources\" directory to find it.

In this example we are just wanting to show the plant name that corresponds with the plant code so we need to add those two fields. So scroll down to the plants table on the left and add "pltno" and "pltnme" which should be listed under "plants".

While we are not concerned with filtering the data in this example we could use these filters to further refine the results such as retrieving only certain orders or plants.

To help find the plants easier we should sort the results. So select "pltno" and have it sort as "ascending" (a to z, etc).

Now that we've created the query we can either save it, preview/edit the SQL code, or place the data into Excel. For now just leave it on "Return Data to Microsoft Excel" so we can place the data in the Excel worksheet.

Now simply give the location you'd like to see that data or leave it as it was (it will default to the cell the was originally selected when you created the query.

And there we have it. All the plant codes and their corresponding names in the database (I only have one, but you'll likely have more).

Back to tutorials index
|