public IActionResult ExportDataSheet(string filter) { var expression = _dataSheetHelper.SearchForExcel(filter); if (expression == null) { expression = PredicateBuilder.True <DataSheet>(); } expression = expression.And(k => k.FTSUser == null); List <DataSheetWaitingForAdminDto> dataSheetDtos = _dataSheetService.GetDataSheetWaitingForAdminDtos(expression); string[] columns = { "Müşteri Adı", "Kayıt No", "Kayıt Yapan", "Kayıt Tarihi", "Departman", "Ana Müşteri", "Ana Müşteri Model No", "Model No", "Durum" }; byte[] filecontent = ExcelExportHelper.ExportExcel(dataSheetDtos, "FTSDataSheet", true, columns); return(File(filecontent, ExcelExportHelper.ExcelContentType, "FTSDataSheet.xlsx")); }