FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour TXT 2 FILE
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
TXT 2 FILE
Posted: 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
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: TXT 2 FILE
Posted: Sat Oct 23, 2010 12:34 PM

Hello Silvio,
have a look at my Post :

viewtopic.php?f=3t=12318p=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.
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: TXT 2 FILE
Posted: Sat Oct 23, 2010 07: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
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
Re: TXT 2 FILE
Posted: 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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: TXT 2 FILE
Posted: Sun Oct 24, 2010 06: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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: TXT 2 FILE
Posted: Sun Oct 24, 2010 06:47 PM

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

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: TXT 2 FILE
Posted: Tue Oct 26, 2010 08: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

Continue the discussion