If the above doesn't work for you in Excel, or you don't use Excel, and you don't care about colors or formatting too much, you can use the csv (comma separated values) format. Use commas to separate your columns, and returns to separate your rows. Any data with commas in it will have to be double-quoted, but other than that just use the following:
RESPONSE.setHeader("Content-type","text/csv")
RESPONSE.setHeader("Content-disposition","filename=example.csv")
If you do have Excel, it understands and imports the text/csv MIME type. |