title: Tab Delimited Text File
body: <p>I am able read a data contained in a text-file. This data is then coded to be displayed in a datagridview. The original format of the data is comma-delimited. Now I want to use the datagridview's data to save it using tab-delimited instead.</p>
  
  <p>The problem is that, not all the fields are equal length so is giving me something like,</p>
  
  <pre><code>A B C
  1 567889 123
  </code></pre>
  
  <p>and it should be like,</p>
  
  <pre><code>A B      C
  1 567889 123
  </code></pre>
  
  <p>second example of what I want,</p>
  
  <pre><code>ABCDE ABC     A
  123   1258741 528712
  </code></pre>
  
  <p>So no matter the header length column or data length column.</p>
  
  <p>I used the string builder as, <code>sb.Append("{0}\t,{1}\t",field1, field2)</code> but it doesn't works. Also tried <code>write.Write(field + "\t")</code></p>