Hola, Que tal?
Estoy teniendo el problema de los caracteres ilegibles al exportar en excel.
Lo estoy haciendo con StreamWriter.
alguno se le ocurre alguna solucion?
adjunto codigo
StreamWriter SW;
SW=File.CreateText(fullpath);
StringBuilder oStringBuilder = new StringBuilder();
oStringBuilder.Append("Titulo" + separator);
SW.WriteLine(oStringBuilder.ToString().Substring(0 ,oStringBuilder.ToString().Length - 1));
oStringBuilder.Length = 0;
SW.WriteLine(string.Empty);
oStringBuilder.Length = 0;
foreach(DataRow oDataRow in oDataTable.Rows)
{
/*foreach(DataColumn oDataColumn in oDataTable.Columns)
{
oStringBuilder.Append(oDataRow[oDataColumn.ColumnName] + separator);
}*/
if(oDataRow["title"]!=null)
oStringBuilder.Append(oDataRow["title"]+ separator);
}
SW.WriteLine(oStringBuilder.ToString().Substring(0 ,oStringBuilder.ToString().Length - 1));
oStringBuilder.Length = 0;
}
SW.Close();
Gracias