找传奇、传世资源到传世资源站!

c# 使用Epplus存储Excel

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

c# 使用Epplus存储Excel C#语言基础-第1张 public static string HexToASCII(string Msg) { byte[] buff = new byte[Msg.Length / 2]; string Message = ""; for (int i = 0; i < buff.Length; i ) { buff[i] = byte.Parse(Msg.Substring(i * 2, 2), System.Globalization.NumberStyles.HexNumber); } System.Text.Encoding chs = System.Text.Encoding.ASCII; Message = chs.GetString(buff); return Message; } public static string HexToStr(string Msg) { byte[] buff = new byte[Msg.Length / 2]; string Message = ""; for (int i = 0; i < buff.Length; i ) { buff[i] = byte.Parse(Msg.Substring(i * 2, 2), System.Globalization.NumberStyles.HexNumber); } System.Text.Encoding chs = System.Text.Encoding.GetEncoding("gb2312"); Message = chs.GetString(buff); return Message; } public static string StrToHex(string Msg) { byte[] bytes = System.Text.Encoding.Default.GetBytes(Msg); string str = ""; for (int i = 0; i < bytes.Length; i ) { str = string.Format("{0:X}", bytes[i]); } return str; }

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复