I would like to know how to export an excel file using ajax, I have tried in the following way, but it does not work:
$("#ajax_loader").css("display", "");
    var formato = "PDF";
    //window.location.href = url;
    //$("#ajax_loader").hide();
    var fd = new FormData();
    fd.append("format", formato);
    fd.append("nombreObra", $('#nombre_obra').val());
    $.ajax({
        type: "POST",
        url: '<%= Url.Action("Export", "Obras")%>',
        data: fd,
        DataType: 'json',
        contentType: false,
        processData: false,
        success: function (data) {
            $("#ajax_loader").hide();
        }
    });
 });
If anyone has any ideas, I would greatly appreciate it. Greetings.
