工作我使用UTF8不是我的.NET代码在Excel
byte[] bytesToSend = System.Text.Encoding.UTF8.GetBytes(partialtorender);
那么M以创作它练成
文本中的“印地文”语言即将胡言乱语所产生的excel,你可以请建议做什么?
System.IO.MemoryStream memStr = new System.IO.MemoryStream();
memStr.Write(bytesToSend, 0, bytesToSend.Length);
memStr.Position = 0;
FileStreamResult result1 = new FileStreamResult(memStr, "application/ms-excel");
Response.AddHeader("content-disposition", "attachment; filename=" + "newExcelSheet" + ".xls");
return result1;
你没有向你展示如何在Excel中编写它,或者你是否以任何方式告诉Excel它是否是UTF-8数据,形状或形式...... –
你可以展示更多的代码吗?您发布的行只能将您的UTF-8字符串转换为字节数组。没有问题:-) –
代码已添加,请检查一下 – 1Mayur