• I have created a stored procedure for the exec function above. In Excel, I have added an existing connection with SQL type calling the stored procedure.

    It worked perfectly.

    Thanks for your help