ExcelXml转换为另一种语言 [英] ExcelXml convert to Another Language

查看:92
本文介绍了ExcelXml转换为另一种语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我有一个xml文件作为字符串。我需要将它发送到日语语言浏览器。尝试使用以下代码,但没有转换。如有任何问题,请查看我的代码。





// string StrEncoding =Shift_JIS;

//编码ascii = Encoding.GetEncoding(StrEncoding);

//编码japanese = Encoding.GetEncoding(20127);

// byte [] unicodeBytes = ascii.GetBytes(xslXml);

// byte [] arrReportContaint = Encoding.Convert(ascii,japanese,unicodeBytes);









Hi

I have a xml file as string . I need to send it to browser in Japan Language . Tried with following code but did't convert . Please check my code for any issues .


//string StrEncoding = "Shift_JIS";
//Encoding ascii = Encoding.GetEncoding(StrEncoding);
//Encoding japanese = Encoding.GetEncoding(20127);
//byte[] unicodeBytes = ascii.GetBytes(xslXml);
//byte[] arrReportContaint = Encoding.Convert(ascii, japanese, unicodeBytes);




private void LoadExcelData(string xslXml, string header)
       {
           UTF8Encoding encoder = new UTF8Encoding();
           byte[] arrReportContaint = encoder.GetBytes(xslXml);
           Response.ClearContent();
           Response.ClearHeaders();
           Response.Buffer = true;
           Response.ContentType = ContentTypeExcel;
           Response.Charset = string.Empty;
           Response.Cache.SetCacheability(HttpCacheability.NoCache);
           Response.AddHeader(ContentDisposition, header);
           Response.BinaryWrite(arrReportContaint);
           Response.Flush();
           Response.End();
       }

推荐答案

这篇关于ExcelXml转换为另一种语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆