标签:test pen res load space github ace extension cte
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里的图片
标签:test pen res load space github ace extension cte
原文地址:https://www.cnblogs.com/coolyylu/p/10051333.html