Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select From ExcelFirstSheet
Message
 
À
18/05/2010 13:21:29
Bruno Maddalozzo
Informatica Aziendale
Arsie, Italie
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Vista
Divers
Thread ID:
01465038
Message ID:
01465039
Vues:
86
This message has been marked as the solution to the initial question of the thread.
>I'm trying to extract data form Excel via ODBC.
>I can connect like that:
>
>lcStringaConn = "Driver={Microsoft Excel Driver (*.xls)};" ;
>           		+ "DriverId=790;" ;
>           		+ "Dbq=E:\myDir\myFile.xls;" ;
>           		+ "DefaultDir=E:\myDir"
>           	
>ln = SQLStringConnect(lcStringaConn)
>
>
>I' can get data with:
>
>? SQLExec(ln, "Select * From ['Sheet1$']")
>
>
>but the first sheet is often renamed so I've the need to extract data from the first sheet without knowing the name of the sheet.
>Something like:
>
>? SQLExec(ln, "Select * From ['Workbook.sheets(1)$']")
>
>
>Is it possible?
>TIA
>Bruno

You could use SQLTABLES to get the list of used sheets and then decide from where you want to get data.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform