Exemplo n.º 1
0
        public IHttpActionResult GetDetailedReport([FromBody] SimulationModel model)
        {
            var response = Request.CreateResponse();

            response.Content = new ByteArrayContent(reportCreator.CreateExcelReport(model));
            response.Content.Headers.ContentType        = new MediaTypeHeaderValue("application/octet-stream");
            response.Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment")
            {
                FileName = "DetailedReport.xlsx"
            };

            return(Ok(response));
        }