title: How to read from excel in a specific encoding?
body: <p>I copied from an excel file to a txt file the column names. I read from the txt file the following way:</p>
  
  <pre><code>CultureInfo cultureHU;
  Encoding encodingHU;
  cultureHU = CultureInfo.GetCultureInfo("hu-HU");
  encodingHU = Encoding.GetEncoding(cultureHU.TextInfo.ANSICodePage);
  using (StreamReader sr = new StreamReader("settings.txt", encodingHU, true))
  {
  ...
  }
  </code></pre>
  
  <p><strong>How do I read from an Excel file with the same encoding?</strong> If I do it the default way (xlRange.Cells[1, i].Value.ToString()), then I get wrong values:</p>
  
  <ul>
  <li>in the excel and txt file I have: "Szerzõdõ"</li>
  <li>reading from the text file in <em>encodingHU</em> encoding I get: "Szerződő" (this is the correct format)</li>
  <li>reading from excel in C# i get: "Szerzõdõ"</li>
  </ul>