I have a method that generates an excel file and writes it to a directory, but then I get the directory path and need to download the excel file, but nothing happens, no error. Can someone help in what I'm failing?
[HttpGet]
public FileResult ObterDadosClientesBDO(ParametrosListaCliente filtro)
{
var jsonResult = Json(InstanceResolverFor<IServicoListaClientesBDO>.Instance.ObterDadosClientesBDO(filtro).ToArray(), JsonRequestBehavior.AllowGet);
jsonResult.MaxJsonLength = int.MaxValue;
string nomeRelatorio = string.Format("{0}{1}.xlsx","NOMERELATORIO", DateTime.Now.ToString("ddMMyyyyhhmmss"));
string caminhoRelatorio = GerarRelatorioExcel(jsonResult, nomeRelatorio);
return File(caminhoRelatorio, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", nomeRelatorio);
}