title: Export DataTable to Excel File in asp.net
body: <p>I have read this article that exports datatable to excel file.
  It worked great.</p>
  
  <p><a href="https://stackoverflow.com/questions/1746701/export-datatable-to-excel-file">Export DataTable to Excel File</a></p>
  
  <p>and the code is below:</p>
  
  <pre><code>dt = city.GetAllCity();//your datatable 
  string attachment = "attachment; filename=city.xls"; 
  Response.ClearContent(); 
  Response.AddHeader("content-disposition", attachment); 
  Response.ContentType = "application/vnd.ms-excel"; 
  string tab = ""; 
  foreach (DataColumn dc in dt.Columns) 
  { 
      Response.Write(tab + dc.ColumnName); 
      tab = "\t"; 
  } 
  Response.Write("\n"); 
  int i; 
  foreach (DataRow dr in dt.Rows) 
  { 
      tab = ""; 
      for (i = 0; i &lt; dt.Columns.Count; i++) 
      { 
          Response.Write(tab + dr[i].ToString()); 
          tab = "\t"; 
      } 
      Response.Write("\n"); 
  } 
  Response.End(); 
  </code></pre>
  
  <p>But when I use this codes, the korean characters are all broken.
  Can anyone help me with this problem?</p>