Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Import file into a cursor?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01402461
Message ID:
01402469
Vues:
68
>Well..heh..yeah that's what i was going to try - I'm just having a hard time figurin out the syntax.
>I was hoping I could find some slick way to do it - have the cursor created based on the field names in the first line...
>plus I don't know how to deal with the delimiters...
>


Creating the cursor having only field names? Do not you need also field types and lengths in addition to field names?
If you do not care about exact data representation, then you may do something like:
oExcel= CREATEOBJECT("Excel.Application")
oExcel.Workbooks.Open("c:\hi.csv")
oExcel.Activeworkbook.SaveAs("c:\hew.xls",-4143)
oExcel.Quit

IMPORT from c:\hew.xls xls
And then alter column names based on the first record.
or use
oExcel.Activeworkbook.SaveAs("c:\hew.dbf", Xldbf4 )
to create table directly from Excel


But it will be a table, not cursor

Good Luck
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform