I am trying to return an Excel sheet from my struts2 action class.
I am not sure what result-type should I be using? Has anyone tried to return an excel from strut
You can utilize the Stream Result type
an Example will look like this:
application/vnd.ms-excel
excelStream
attachment; filename="${fileName}"
1024
${contentLength}
excelStream will be a method in your action class, contentLength will be length of the stream, fileName will be a getter which will return back the name of the file.