Article ID: 130137 - Last Review: February 22, 2005 - Revision: 2.2 HOWTO: How to Use ODBC to Run SQL SELECT on Microsoft Excel DataThis article was previously published under Q130137 SUMMARY
This article gives example SQL SELECT statements that you can use against
Microsoft Excel versions 4.0 and 5.0 worksheets in Visual FoxPro by using
ODBC.
MORE INFORMATION
You should already have created data sources to your Microsoft Excel files.
For more information about how to do this, please see the following article
in the Microsoft Knowledge Base:
130732
(http://support.microsoft.com/kb/130732/EN-US/
)
How to Create Data Source to Microsoft Excel Files
To execute an SQL SELECT against a Microsoft Excel version 5.0 workbook,
you may need to execute the SQLTABLES() function to get the names of the
worksheets that reside in the workbook. This will build a cursor that you
can then browse to see the actual names of the worksheets to use. Here is
an example use of the SQLTABLES function:
Here is an example of an SQL SELECT to a Microsoft Excel version 5.0 file: Here is an example of an SQL SELECT to a Microsoft Excel version 4.0 file: | Article Translations
|
Back to the top
