次の方法で共有


How to: Access Visual FoxPro Data in Microsoft Office

You can access data from Visual FoxPro databases and tables in Microsoft Office applications, such as Microsoft Excel or Microsoft Word, using the Visual FoxPro OLE DB Provider.

Note

You can import Visual FoxPro data using the Visual FoxPro OLE DB Provider only in Office XP.

To connect to a Visual FoxPro database or table in Excel

  1. Open an Excel worksheet.

  2. From the Data menu, point to Import External Data, and click Import Data.

  3. In the Select Data Source dialog box, click New Source Data Connection.

  4. In the Data Connection Wizard, select Other/Advanced.

  5. In the Provider tab, select Microsoft OLE DB Provider for Visual FoxPro.

The Connection tab in the Data Link Properties dialog box appears.

To connect to a Visual FoxPro database or table in Word

  1. Open a Word document.

  2. From the View menu, point to Toolbars, and click Database.

  3. On the Database toolbar, click the Insert Database icon.

  4. In the Database dialog box, click Get Data.

  5. In the Select Data Source dialog box, click New Source Data Connection.

  6. In the Data Connection Wizard, select Other/Advanced.

  7. In the Provider tab, select Microsoft OLE DB Provider for Visual FoxPro.

The Connection tab in the Data Link Properties dialog box appears.

To add a Visual FoxPro database or table folder

  1. On the Connection tab and in the Select or enter a database name box, type path and name of the database or table folder you want.

    -or-

    To browse for a Visual FoxPro database or table folder, click the ellipsis (...) button to the right of the Select or enter a database name box to open the Configure Connection dialog box.

  2. Specify a different collating sequence if desired.

  3. To test the connection, click Test Connection. If connection is successful, click OK.

See Also

Tasks

How to: Access Visual FoxPro Data in Visual Studio

Reference

OLE DB Provider for Visual FoxPro

Language Reference for OLE DB Development

Other Resources

Visual FoxPro Data Access Using the OLE DB Provider