How to load table data as Excel sheet using php ..?

Guys, I am generating a dataset in a table after som set calculation .. as soon as the user clicks the save excel file button so that this data should be generated to be loaded.

What is the php code for this.

guys, no data is being fetched from the database ... it is displayed after doing a set of calculations.

Since I have no idea I didn't have any associated code ... sry for this ..

below is how my table looks like

https://ibb.co/mUMOrQ

below is my table code

       <div id="myModal" class="modal fade in">
    <div class="modal-dialog">
        <div class="modal-content">

            <div class="modal-header">
                <a class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span></a>
                <div class="table-title">
                <h3>CUF Table</h3>
                </div>
                <table class="table-fill" id="tabid">
                <thead>
            </div>

    <div class="modal-body">
        <tr>
        <th class="text-left">TimeStamp</th>
        <th class="text-left">CUF</th>
        </tr>
        </thead>
        <tbody class="table-hover">
        <!--tr>
        <td class="text-left" id="data"></td>
        <td class="text-left" id="data1"></td>
        </tr-->
        </tbody>
        </table>
    </div>

     <div class="modal-footer">
                <div class="btn-group">
                    <button id="change-chart"  class="btn btn-primary"><span class="glyphicon glyphicon-check"></span>Save</button>
                  </div>
      </div>
      </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->   

      

Below is the jquery included in the file upload kit

     $("#BUTTON").click(function(){
     $("#TABLE").table2excel({
     // exclude CSS class
    exclude: ".noExl",
    name: "Data",
    filename: "Data" //do not include extension
   });
   });

      

+3


source to share


1 answer


+1


source







All Articles