Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
.xls file from text file
Message
From
02/11/1999 08:32:38
 
 
To
02/11/1999 08:27:21
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00285341
Message ID:
00285388
Views:
18
>Thanks Craig.
>
>SELECT MyTable
>APPEND FROM MyFile.TXT DELIMITED
>COPY TO MyFile.XLS TYPE XLS
>
>For that I need to create the structure for MyTable, then append the text file to the MyTable and then copy from MyTable to .xls file. Is there any command like 'Import Command' which Imports data from an external file format to create a new Visual FoxPro table.

There isn't one command to help you with this. You'll have to read the entire file into a memo and start parsing it programmatically. Your program will need some intelligence to understand when it sees dates, etc. From that you can begin to figure out what the fields are.

Another way is to use Excel as a COM server. You can import the file into there and never show it to the user.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Reply
Map
View

Click here to load this message in the networking platform