 <p>ok you are clearly applying that replace to whole file that's why it's affecting all the columns, try another way :<br> -loop each line <br> -in each loop split elements using commas</p> <pre><code>var lineElements = line.split(','); </code></pre> <p>-and then specifically apply that to 5th column : <br></p> <pre><code>var fifthElement = lineElements[4].Replace(' ', ','); </code></pre> <p>-that will apply the effect only on 5th element<br> -combine it up and get whole line as you were</p>