Archive for the ‘Java’ Category

h1

[Java] – Simple trick to export to excel

April 5, 2007

Simply set the header to inform browser that the content type is for xls application.

response.setHeader(“Content-type”,”application/vnd.ms-excel”);

response.setHeader(“Content-disposition”,”inline; filename=myfilename.xls”);

Advertisements