title: How to Download table data as excel sheet using php..?
body: <p><strong>Guys i'm generating a set of data in a table after som set of calculation.. as soon as user clicks save button excel file with that data must be generated for downloading..</strong></p>
  
  <p><strong>What is the php code for that ..</strong></p>
  
  <p><strong>guys the data is not retrieved from database...its being displayed after a set of calculation as been performed.</strong></p>
  
  <p><strong>Since i dont have any idea ive not posted any related code...sry for that..</strong></p>
  
  <p><strong>below is how my table looks like</strong></p>
  
  <p><a href="https://ibb.co/mUMOrQ" rel="nofollow noreferrer">https://ibb.co/mUMOrQ</a></p>
  
  <p><strong>below is my table code</strong></p>
  
  <pre><code>       &lt;div id="myModal" class="modal fade in"&gt;
      &lt;div class="modal-dialog"&gt;
          &lt;div class="modal-content"&gt;
  
              &lt;div class="modal-header"&gt;
                  &lt;a class="btn btn-default" data-dismiss="modal"&gt;&lt;span class="glyphicon glyphicon-remove"&gt;&lt;/span&gt;&lt;/a&gt;
                  &lt;div class="table-title"&gt;
                  &lt;h3&gt;CUF Table&lt;/h3&gt;
                  &lt;/div&gt;
                  &lt;table class="table-fill" id="tabid"&gt;
                  &lt;thead&gt;
              &lt;/div&gt;
  
      &lt;div class="modal-body"&gt;
          &lt;tr&gt;
          &lt;th class="text-left"&gt;TimeStamp&lt;/th&gt;
          &lt;th class="text-left"&gt;CUF&lt;/th&gt;
          &lt;/tr&gt;
          &lt;/thead&gt;
          &lt;tbody class="table-hover"&gt;
          &lt;!--tr&gt;
          &lt;td class="text-left" id="data"&gt;&lt;/td&gt;
          &lt;td class="text-left" id="data1"&gt;&lt;/td&gt;
          &lt;/tr--&gt;
          &lt;/tbody&gt;
          &lt;/table&gt;
      &lt;/div&gt;
  
       &lt;div class="modal-footer"&gt;
                  &lt;div class="btn-group"&gt;
                      &lt;button id="change-chart"  class="btn btn-primary"&gt;&lt;span class="glyphicon glyphicon-check"&gt;&lt;/span&gt;Save&lt;/button&gt;
                    &lt;/div&gt;
        &lt;/div&gt;
        &lt;/div&gt;&lt;!-- /.modal-content --&gt;
      &lt;/div&gt;&lt;!-- /.modal-dialog --&gt;
  &lt;/div&gt;&lt;!-- /.modal --&gt;   
  </code></pre>
  
  <p><strong>Below is jquery that ive included to download the file</strong></p>
  
  <pre><code>     $("#BUTTON").click(function(){
       $("#TABLE").table2excel({
       // exclude CSS class
      exclude: ".noExl",
      name: "Data",
      filename: "Data" //do not include extension
     });
     });
  </code></pre>