public async Task <ActionResult> ExportExcel(int id) { string apiUrl = _appUrlHelper.GetApiUrl(string.Format(ApiUrlPath.COMPUTER_GET_ALL, id)); var result = await HttpUtilities.GetAsyncApi <ReturnResult <ComputerExportModel> >(apiUrl); var file = ExcelUtilities.CreateExcelFile <ComputerExportModel>("computer.xls", result.ItemList); return(File(file, "application/ms-excel", "ComputerList.xlsx")); }
public async Task <ActionResult> CreateFilteredItem(List <StudySchedule> filterItems) { StudyScheduleController.file = ExcelUtilities.CreateExcelFile <StudySchedule>("StudySchedule.xls", filterItems); return(Ok()); }