Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
.xls file from text file
Message
De
02/11/1999 08:32:38
 
 
À
02/11/1999 08:27:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00285341
Message ID:
00285388
Vues:
20
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform