Hi, I have an application which uses GridView Exporting to excel. It works fine, and I want to add a Head Title on the Excel File, but when I put The Head Title, the Unicode Encoding or UTF8 Encoding doesn't work, this is my code:
Could you help me please...
Thanks in advanced...
if
(dialog.ShowDialog() ==
true
)
{
using
(Stream stream = dialog.OpenFile())
{
GridViewExportOptions exportOptions =
new
GridViewExportOptions();
exportOptions.Format = format;
exportOptions.ShowColumnFooters =
false
;
exportOptions.ShowColumnHeaders =
true
;
exportOptions.ShowGroupFooters =
false
;
exportOptions.Encoding = Encoding.UTF8;
String unicodeString =
"Título de la Aplicación\n"
;
unicodeString = unicodeString +
"Sub Título de la Aplicación"
;
Encoding unicode = Encoding.Unicode;
byte
[] unicodeBytes = unicode.GetBytes(unicodeString);
stream.Write(unicodeBytes, 0, unicodeBytes.Length);
gridExport.Export(stream, exportOptions);
}
}
Could you help me please...
Thanks in advanced...