首页 > 其他 > 详细

epplus输出成thml

时间:2018-12-01 22:42:17      阅读:133      评论:0      收藏:0      [点我收藏+]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using OfficeOpenXml;
using System.IO;
using EPPlus.Html;
namespace testepplus
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string zpath = Server.MapPath("/") + "test1.xlsx";
            FileInfo zfile = new FileInfo(zpath);

            using (ExcelPackage excel = new ExcelPackage(zfile,"123"))
            {
                //excel.SaveAs(new FileInfo(Server.MapPath("/") + "test1.xlsx"), "123");
                Response.Write(EPPlus.Html.EPPlusExtensions.ToHtml(excel.Workbook.Worksheets[3]));

            }

        }
    }
}

 

 

fx要4.5+ ,需要huget package  epplus ,epplus.html   

 

可以从https://github.com/fitogram/EPPlus.Html 下载源码更改fx为4.0

 

epplus.html 0.20版本不支持excel里的图片

epplus输出成thml

原文:https://www.cnblogs.com/coolyylu/p/10051333.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!