Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Text to table
Message
 
 
À
16/05/2007 09:05:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01225935
Message ID:
01225939
Vues:
19
>Hi all,
>I need to sort out the words in a text file and put them into a table.
>Do you have any solution for it?
>like this:
>
>sample text
>
>I need to sort out the words in a text file and put them into a table.
>Does anybody have a solution or a link for it?
>
>
>table1
>
>field1 | field2
>I      |   1
>need   |   1
>to     |   1
>sort   |   1
>out    |   1
>the    |   1
>words  |   1
>...
>
>
>

The simplest way would be to put them into array using ALINES and then append from array.

In other words:
lcString = filetostr('MyFile.txt')
alines(laWords, lcString,.t.," ")

create table Words (word C(100))
append from array laWords
From the top of my head and not tested.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform