Export HTML Table to Excel

Export HTML Table to Excel

Here is a simple way to export an HTML table to Excel with a single line of code. For the technique to work, you must have Excel installed on the your machine.

Copy the following code and paste it in notepad. Save it as an ASP page, and then open it in the browser to see the action live.

Response.ContentType = "application/"

Don’t include normal HTML, TITLE, HEAD, and BODY tags. They will create a problem.


Share the Post: