Hello everybody,
any ideas if your importing a file with tabs without using a dataport?
We created a function to run several imports using a NAS timer setup. This works fine with field seperators like ";" or "|". Now we need to run the function with tab as field seperation. I tried to convert it to char but this doesn't work because the tab comes as several blanks. Any hints?
Thanks a lot!
Regards
Nicole
ProTAKT Projekte & Business Software AGMicrosoft Dynamics NAV Partner
Bad Nauheim, Germany
http://www.protakt.de
http://twitter.com/protakt 0
Answers
If you want to maintain tabs separated file, you have to define char variable (length 1 byte), assign value 9 (TAB code) into it and separate needed field from imput string.
Any ideas?!
Microsoft Dynamics NAV Partner
Bad Nauheim, Germany
http://www.protakt.de
http://twitter.com/protakt
I think only via InStream. For example so:
f.TEXTMODE := TRUE;
f.OPEN('c:\1.txt');
f.CREATEINSTREAM(stream);
WHILE stream.READTEXT(str) > 0 DO BEGIN
MESSAGE(str);
FOR i := 1 TO STRLEN(str) DO
IF str = 9 THEN
str := '^';
MESSAGE(str);
END;
f.CLOSE;
http://dynamicsuser.net/forums/post/61970.aspx
http://dynamicsuser.net/forums/post/52315.aspx
Regards
Nicole
Microsoft Dynamics NAV Partner
Bad Nauheim, Germany
http://www.protakt.de
http://twitter.com/protakt