<textarea readonly="readonly" name="code" class="c++">
控制器: var filepath = Server.MapPath("~/Excell/excel.xlsx");
服务层: public string TunnellingDetailDownLoad(int ProjectId, int AreaId, int SHD_ID, int Line_No, string filepath)
{
string FileName = "";
HttpResponse httpResponse = HttpContext.Current.Response; FileStream file = null;
try {
file = new FileStream(filepath, FileMode.Open, FileAccess.Read);
} catch (Exception ex)
{ throw ex; }
IWorkbook hssfwork = null; //读取Sheet
.Net利用NPOI导出使用模板的Excel
最新推荐文章于 2022-06-18 16:21:59 发布