How to output an Excel *.xls file from classic ASP

It’s AddHeader, not AppendHeader.

<%@ Language=VBScript %>
<%  Option Explicit

Response.ContentType = "application/"
Response.AddHeader "Content-Disposition", "attachment; filename=excelTest.xls"

I’ve written a blog post about how to generate Excel files in ASP Classic. It contains a rather useful piece of code to generate both xls and csv files.

Leave a Comment