Ejemplo n.º 1
0
 public JsonResult GetXLSFileByTable(ExcelTable table)
 {
     try
     {
         NPOIExcelHelper helper   = new NPOIExcelHelper();
         var             HSSFWORK = helper.SaveTableToExcel(new List <ExcelTable>()
         {
             table
         });
         var fileName = SaveHsskworkStream(HSSFWORK);
         return(Json(new { flag = true, result = fileName }, JsonRequestBehavior.AllowGet));
     }
     catch (Exception e)
     {
         return(Json(new { flag = false, message = e.Message }, JsonRequestBehavior.AllowGet));
     }
 }