title: how to save string in 'utf-8' format in a .xlsx using pandas to_exel (to_csv is able to save it as .csv)
body: <p>since I am able to save string using to_csv using 'utf-8' encoding, I am expecting to do be able to do the same using to_excel. This is not an issue on my side with encoding. None of the previous thread I saw, discuss this issue.</p>
  
  <p>I am using python 2.7.12 on Windows 7(Anaconda) and pandas 0.18.1</p>
  
  <p>I have 2 questions related to saving a panda dataframe containing special character (encoding as 'utf-8') as a .csv or .xlsx file.</p>
  
  <p>For example:</p>
  
  <pre><code>import pandas as pd
  
  # Create a Pandas dataframe from the data.
  df = pd.DataFrame({'Data': ['1', 'as', '?%','ä']})
  </code></pre>
  
  <p>I can save the dataframe as a .cvs file without any issue:</p>
  
  <pre><code>df.to_csv('test_csv.csv',sep=',', encoding='utf-8')
  </code></pre>
  
  <p>and it works. When importng the data I need to choose 'utf-8' in Excel and everything is fine.</p>
  
  <p>Now if I try to save the same dataframe as an .xlsx then it doesn't work.</p>
  
  <p>I have the following code:</p>
  
  <pre><code> # Create a Pandas Excel writer using XlsxWriter as the engine.
  writer = pd.ExcelWriter('pandas_simple.xlsx', engine='xlsxwriter',   options={'encoding':'utf-8'})
  
  # Convert the dataframe to an XlsxWriter Excel object.
  df.to_excel(writer, sheet_name='Sheet1',encoding='utf-8')
  writer.save()
  </code></pre>
  
  <p>and I got the following error message:</p>
  
  <blockquote>
    <p>UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
    7: ordinal not in range(128)</p>
  </blockquote>
  
  <p>I am not 100% sure to use the correct option to set the encoding:</p>
  
  <pre><code>options={'encoding':'utf-8'}
  </code></pre>
  
  <p>and</p>
  
  <pre><code>encoding='utf-8'
  </code></pre>
  
  <p>since it is not clear to me how to proceed from the documentation.</p>
  
  <p>Any idea how to have this working ?</p>
  
  <p>Bonus question related to df.to_csv. Is there a way to use some special character as separator ? Some reason, the code I am migrated from R to python is using sep='¤'.  tried to encode this special character in all possible way but is always failed. Is it possible to do that ?</p>
  
  <p>Thanks a lot </p>
  
  <p>Cheers </p>
  
  <p>Fabien</p>