FineUI导出Excel

1、【经验分享】导出Excel的乱码问题http://www.fineui.com/bbs/forum.php?mod=viewthread&tid=6326&highlight=Excel

      找到问题的解决办法了  在输出的文件里添加
      sb.Append("<meta http-equiv=\"content-type\" content=\"application/ms-excel; charset=UTF-8\"/> ");

     参考的这个博客里的 需要自己去看 http://www.cnblogs.com/cbcye/archive/2009/05/26/1490451.html

2、Grid在分页的情况下依然能导出全部数据为Excel http://www.fineui.com/bbs/forum.php?mod=viewthread&tid=3324&extra=&highlight=Excel&page=1

      数据源单独一个 private void  BindGrid()。在导出事件中,再调用一次数据绑定。这样的绑定是不分页的。这是取简单的方法。

3、泛型集合数据输出EXCEL的尝试 http://www.fineui.com/bbs/forum.php?mod=viewthread&tid=4147&highlight=Excel

4、导出数据时,首列ID数据为空,变通解决方法

                    int cc ;
                sb.Append("<tr>");
                cc = 0;
                foreach (object value in row.Values)

。。。

                    if (cc++ ==0)
                        html = (row.RowIndex+1).ToString();
                    sb.AppendFormat("<td>{0}</td>", html);

posted on 2014-11-19 13:20  xihong  阅读(465)  评论(0编辑  收藏  举报

导航