Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Import file into a cursor?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01402461
Message ID:
01402469
Views:
70
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform