Click here to Skip to main content
15,892,697 members
Please Sign up or sign in to vote.
1.50/5 (2 votes)
See more:
i have tab deliminated text file like that

a[tab][tab]40550[tab]15415[tab]15411[tab]54115
b[tab][tab]40550[tab]15415[tab]15411[tab]54115
c[tab][tab]40550[tab]15415[tab]15411[tab]54115

i need to write new text file as

name="a.tif" address=40550,15415,15411,54115
name="a.tif" address=40550,15415,15411,54115
name="a.tif" address=40550,15415,15411,54115


can any one help me please or give code for get on by one field value like a then 40550 like that....
Posted

Easiest way is to use a CSV reader - C# CSV Reader and Writer[^] for example - and configure it for a TAB instead of a COMMA as the separator value.

Alternatively, just read all the lines into an array of strings, and use String.Split to break up each line in a loop.
 
Share this answer
 
Have a look at this codeproject article Fill a DataSet from delimited text files[^]

How you write the data out is up to you ...e .g. textwriter[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900