Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with importing tab delimited file
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01458761
Message ID:
01459120
Views:
62
Works fine for me in a simple test below. What is different in your case?
#DEFINE ccTAB CHR(9)

CREATE CURSOR Test (pk i, cf1 C(10), cf2 C(10), cf3 C(10), cf4 C(10), cf5 C(10))

TEXT TO lcStr TEXTMERGE NOSHOW
1<<ccTAB>>11<<ccTAB>>12<<ccTAB>>13<<ccTAB>>14<<ccTAB>>15 
2<<ccTAB>>21<<ccTAB>>22<<ccTAB>>23<<ccTAB>>24<<ccTAB>>25 
3<<ccTAB>>31<<ccTAB>><<ccTAB>>33<<ccTAB>><<ccTAB>>35 
4<<ccTAB>>41<<ccTAB>><<ccTAB>><<ccTAB>><<ccTAB>>45 
ENDTEXT

lcFile = "Temp.txt"
STRTOFILE(lcStr, lcFile)

APPEND FROM (lcFile) TYPE DELIMITED WITH TAB
>Has anyone run into a problem with VFP "skipping" empty tab-delimited fields when using an append from command? I have a file where just a few records are not importing properly and see that the file has three empty tabs in a row and VFP simply moves to the next populated field and starts populating away from there!
>
>There is another instance in the file where there are three similar blank fields (toward the end of a record) and it imports just fine with empty fields. I've looked at the file with the "show whitespace" and also with Word in show formatting codes mode. I see no difference in the file points that work with the ones that dont.
>
>I suppose I can scan down the file looking for two simultaneous tabs, inserting a space between them (hopefully that will work), but seems like such an obvious thing that should just work.
>
>Has anyone else run into this problem?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform