public FileResult Export(string queryJson) { string filename = DateTime.Now.ToString("yyyyMMdd") + ".xls"; byte[] excel = new EME.Code.Excel.NPOIExcel().DataTableToExcel(dt, DateTime.Now.ToString("yyyyMMdd")); return File(excel, "application/vnd.ms-excel", filename); }