TXT 2 FILE

TXT 2 FILE

Postby Silvio » Sat Oct 23, 2010 12:00 pm

is there a function to load field from txt and insert them on a dbf file ?
sample of txt file :

4095 22/10/2010 8:00 2 3 5 6 9 12 13 14 16 18 4
4096 22/10/2010 9:00 1 5 6 7 12 15 16 17 19 20 1
4097 22/10/2010 10:00 3 4 8 10 12 13 14 15 16 18 17
4098 22/10/2010 11:00 1 3 6 7 8 9 10 12 17 20 6
4099 22/10/2010 12:00 2 5 8 9 10 11 16 17 18 19 16
4100 22/10/2010 13:00 3 6 7 9 11 13 15 16 17 19 5
4101 22/10/2010 14:00 1 6 7 9 10 12 13 14 15 20 13
4102 22/10/2010 15:00 1 4 6 8 9 13 16 17 19 20 7
4103 22/10/2010 16:00 2 3 4 5 6 7 14 15 17 19 9
4104 22/10/2010 17:00 1 7 8 11 12 13 15 18 19 20 12
4105 22/10/2010 18:00 3 4 5 9 10 11 12 15 16 20 13
4106 22/10/2010 19:00 2 4 5 10 12 15 16 17 18 19 2
4107 22/10/2010 20:00 1 2 3 9 12 13 16 18 19 20 7
4108 22/10/2010 21:00 1 5 9 10 11 12 15 16 17 19 1
4109 22/10/2010 22:00 1 2 3 9 10 13 15 16 19 20 13
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: TXT 2 FILE

Postby ukoenig » Sat Oct 23, 2010 12:34 pm

Hello Silvio,
have a look at my Post :

viewtopic.php?f=3&t=12318&p=61620

I think, You will get the Informations You need.

Best Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: TXT 2 FILE

Postby Silvio » Sat Oct 23, 2010 7:02 pm

sorry I not have symbols to use strtoken functions on txt file and I must load it from a website ...
sample : http://estrazioni-winforlife.myblog.it/ ... 202010.txt
any Idea ?
Can U help me pls ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: TXT 2 FILE

Postby hag » Sun Oct 24, 2010 12:09 am

have you tried saving the txt file to a comma delimited xcel file then importing to the dbf file? It works for me with other txt files.
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Re: TXT 2 FILE

Postby James Bott » Sun Oct 24, 2010 6:42 pm

Search the forum for how to read a page from a website.

Read the page into a var. Strip out all the chr(32)'s with strtran( cVar, " ",""). Save to a local file, then do an APPEND FROM ... DELIMITED WITH CHR(9). You will need to have a DBF file with the correct structure to append into. If you then need to move the data to a different file, you can do so from the temp database you appended the data into.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: TXT 2 FILE

Postby James Bott » Sun Oct 24, 2010 6:47 pm

Oh, and you will have to delete the first record in the DBF file since it contains the column names.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: TXT 2 FILE

Postby Silvio » Tue Oct 26, 2010 8:06 am

I not Know How make it pls
have you an test sample pls
I sent you txt file and structure dbf thnks
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Enrico Maria Giordano and 96 guests