views:

22

answers:

1

We use the jboss seam-->excel module integration for generating excel sheets using e:worksheet. But the downloaded file name comes out as ExportUsers.jxl.xls, I would rather see this as ExportUsers.xls. How do I customize this information.

+1  A: 

filename attribute of the e:workbook tag

<e:workbook filename="ExportUsers.xls" />

Take a look at the Seam excel documentation.

filename — The filename to use for the download. The value is a string. Please note that if you map the DocumentServlet to some pattern, this file extension must also match.

volothamp
I had a mistake in the filename variable where the export type was part of the file name (i.e. jxl, csv) and hence the confusion. This seems to work.type="#{exportType}" - I also pass a exportType to e:workbook and mention the filename as "ExportUsers". So if you specify the type as 'jxl' it prepends the file extension as 'xls' but if you specify the type as 'csv' there is no file extension though.
Joshua
If it works, please mark it as the correct answer.
volothamp