We sometimes need to fetch data from other databases in Excel, and when we want other database data to change, the data that is fetched in Excel changes dynamically. Here's how to implement a dynamic linked database in Excel by using new database query (Microsoft query).
The first time you use the new database query in Excel to query for data, you are prompted to install if Microsoft Query is not installed on the system.
One, Excel link VFP database
VFP is a commonly used database, first of all to introduce. Assuming that the school's data is taken from the PX.DBF table, the following 5-bit code for the school is known, the data is in the field x16, the data value is 03 rows and 06 rows, and is placed in an Excel single cell.
The steps are as follows:
1, click the menu "Data"-"Import external Data"-"New Database Query", the "Select Data Source" dialog box, select "Visual Foxpro tables*", press "OK". If you are not familiar with SQL statements, use the Default Query Wizard to create them.
(Figure 1)
2, in the "Configure Connection" dialog box, press the "Browse" button to select the path of the table px.dbf, press "OK" key.
(Figure 2)
3. In the Query Wizard-Select Columns dialog box, select the columns in the query results, and the data you want to select is in the "x16" field, so move the x16 column in the available table "PX" to the columns in query results, and press Next.
(Figure 3)
4. In the Query Wizard-Filter Data dialog box, because the conditions set in this example are in the field school code "XXDM" and line number "BH", non field "x16", so Click "Next", temporarily do not filter the data.
(Figure 4)
5, in the Query Wizard-Sort Order dialog box, because this example takes a single data, click Next.
(Figure 5)
6, the Query Wizard-Complete dialog box appears, because you want to filter the data, so select "View data in Microsoft Query or edit the query" and click "Finish".
(Figure 6)
7, go to "Microsoft query", see the query Results x16 list all the rows of data.