10-15-2008 10:09 AM
Hi All,
I am reading an input text file which can be in any of the format like tab formatted, commas separated or fixed format. How can i write a code to make it work for all these file format other than writing separately for the above three cases. Kindly suggest.
Thanks,
Neslin.
10-15-2008 10:25 AM
As far as seperators are concerned you may read entire file to stirng table, then identify separator (i.e. if you find tab mark, you assume it is tab separated; if you find ";" mark you assume this is a column separator). Use SEARCH or FIND statement and then (after having the separator) loop at string table and split each entry at this separator. If none of the above was find (no separator or fixed one) split according to given fixed format.
10-15-2008 10:25 AM
As far as seperators are concerned you may read entire file to stirng table, then identify separator (i.e. if you find tab mark, you assume it is tab separated; if you find ";" mark you assume this is a column separator). Use SEARCH or FIND statement and then (after having the separator) loop at string table and split each entry at this separator. If none of the above was find (no separator or fixed one) split according to given fixed format.
10-15-2008 11:11 AM