How to Download table data as excel sheet using php..?

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…

What is the php code for that …

guys the data is not retrieved from database…its being displayed after a set of calculation as been performed

Since i dont have any idea ive not posted any related code…sry for that…:sweat:

below is how my table looks like

You will probably need this:-

1 Like

@SamA74…i downloaded the zip file…now what just include that file in my php code…??

I’ve not actually used that library myself yet, but it was recommended by @swader (so it can’t be bad).
You will have to read the documentation.
Then ask if you get stuck.

1 Like

Below is the link that allows to download html data in excel format…

1)Include jQuery library and the jQuery table2excel plugin in the Html document.


  1. Create an ‘Export’ button to export table data to an Excel file manually. Optional.


3)Call the plugin on the table and done.

// exclude CSS class
exclude: “.noExl”,
name: “Worksheet Name”,
filename: “SomeFile” //do not include extension

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.