I have this code:
StringBuilder output = new StringBuilder();
output.AppendLine("Saldo a disposición: 23.15€");
[...]
System.Text.UnicodeEncoding en = new UnicodeEncoding();
byte[] byteArray = en.GetBytes(output.ToString());
MemoryStream stream = new MemoryStream(byteArray);
string filename = Guid.NewGuid().ToString("N").ToUpper() + ".csv";
stream.Flush();
stream.Seek(0, SeekOrigin.Begin);
return new FileStreamResult(stream, "application/vnd.ms-excel") { FileDownloadName = filename};
When I open the document the symbol "€" and the accent in "disposión" don't appears. It seems like that:
Saldo a disposici�n: 23.15�
Does anyone tell me how to do this?
Thank you!!