I have a HTML form that, when you submit the form by clicking a button the application generates an Excel file using PHPExcel. Everything works fine, but when the excel file is big the waiting time is quite long. I would like to add a progress bar or show a percent complete value. My problem is that I don't know how to insert that in the form and update it continuously.
This is what I am looking to accomplish:

EDIT:
My code is:
HTML form:
<form action="reporteexcel.php" name = "ExportForm" method="POST">
 <table>
[All different fields]
     <tr>
                <td style = "position:relative; top:1em;left:4em;">
                    <input type="submit"  value="Export to excel">
                    <input type="button" onclick="window.close();" value = "Cancel">
                </td>
            </tr>
        </table>
    </form>
In reporteexcel.php:
include 'PHPExcel_1.8.0/Classes/PHPExcel.php';
    include 'F1_Export.php';
    include 'F2_Export.php';
if ($Family == "F1")
    {
        exportF2 ($BasicInformation, $SupplierInformation, $PhysicalParameters, $Supplier, $Family);
    }   
    else if ($Family == "F2")
    {
        exportF2 ($BasicInformation, $SupplierInformation, $PhysicalParameters, $Supplier, $Family);
    }
And in F1_export and F2_export are the functions, which generates the excel files.