public IActionResult ExcelDataOut(string filterJson) { var dateTimeConverter = new IsoDateTimeConverter() { DateTimeFormat = FormattingConstant.NormalDateFormat }; DeliveryItemListVM model = JsonConvert.DeserializeObject <DeliveryItemListVM>(filterJson, dateTimeConverter); (var xlsBytes, var fileName) = service.GetDeliveryItemOutToExcel(model); return(File(xlsBytes, System.Net.Mime.MediaTypeNames.Application.Rtf, fileName)); }