zoukankan      html  css  js  c++  java
  • 特殊符号如(▲)导到EXCEL中产生乱码

    处理方法

    1.在前台页面▲加上 。

    2.在后台强制下转换编码格式

     protected void ExportToExcel_Click(object sender, EventArgs e)
        {
            BindExportData();
            string attachment = "attachment; filename = MarkdownPerformanceOfAllSkuReport.xls";
            Response.ClearContent();
            Response.AddHeader("content-disposition", attachment);
            StringWriter stringWriter = new StringWriter();
            HtmlTextWriter htmlTextWriter = new HtmlTextWriter(stringWriter);
            ResultTable.RenderControl(htmlTextWriter);
            Response.ContentType = "application/ms-excel";
            Response.Write("<meta http-equiv=Content-Type content=\"text/html; charset=utf-8\">");
            Response.Write(stringWriter.ToString());
            Response.End();
        }

  • 相关阅读:
    linux virtualbox
    cboard安装
    test
    kafka安装
    OLAP解释
    php 连接数据库直接转成json格式
    hive学习
    mariadb修改密码
    mariadb anzhuang
    IDEA12 中写hql语句编译器莫名报错
  • 原文地址:https://www.cnblogs.com/scottpei/p/2082767.html
Copyright © 2011-2022 走看看