Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.1
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Application server:Tomcat 5.0.28
Description
When exporting to Excel, if the user chooses to open the file directly, the name given to the worksheet (a.k.a sheet) contains invalid characters. This occurs in Internet Explorer 6 and 7, but not in Firefox 1.5. Here is an example and showing current settings:
server: Tomcat 5 with Tiles and Struts
web.xml:
=====
<filter>
<filter-name>ResponseOverrideFilter</filter-name>
<filter-class>org.displaytag.filter.ResponseOverrideFilter</filter-class>
</filter>
=====
displaytag.properties:
=====
export.types=excel pdf
export.excel=true
export.excel.filename=FrontlineReport.xls
export.excel.include_header=true
=====
exec_report.jsp:
=====
<display:table export='true' name='requestScope.prodDetailList' id='reportElemProd'
requestURI='/report/exec_report.do?tab=PRODUCTIVITY' excludedParams='org.apache.struts.taglib.html.TOKEN'>
<display:setProperty name='export.excel.filename'><bean:message key='text.execReport'/>.xls</display:setProperty>
...
</display:table>
=====
In Firefox, the filename is Executive Report-2.xls and the worksheet name is Executive Report-2.
In IE (6 and 7), the filename is Executive_Report[1].xls and the worksheet name is .xls]Executive_Report[1]. If you try to change the worksheet name, no matter what you type, Excel complains that "While renaming a sheet or chart, you entered and invalid name... cannot contain any of the following characters : \ / ? * [ or ]". If instead of clicking open, you save the file to disk first, the filename is Executive_Report.xls and the worksheet name is Executive_Report and Excel works fine.
It seems likely this issue is related to Tiles and Struts, although no one else appears to be having the same problem. Any advice or suggestions will be appreciated.
I've attached a screenshot to illustrate problem.
server: Tomcat 5 with Tiles and Struts
web.xml:
=====
<filter>
<filter-name>ResponseOverrideFilter</filter-name>
<filter-class>org.displaytag.filter.ResponseOverrideFilter</filter-class>
</filter>
=====
displaytag.properties:
=====
export.types=excel pdf
export.excel=true
export.excel.filename=FrontlineReport.xls
export.excel.include_header=true
=====
exec_report.jsp:
=====
<display:table export='true' name='requestScope.prodDetailList' id='reportElemProd'
requestURI='/report/exec_report.do?tab=PRODUCTIVITY' excludedParams='org.apache.struts.taglib.html.TOKEN'>
<display:setProperty name='export.excel.filename'><bean:message key='text.execReport'/>.xls</display:setProperty>
...
</display:table>
=====
In Firefox, the filename is Executive Report-2.xls and the worksheet name is Executive Report-2.
In IE (6 and 7), the filename is Executive_Report[1].xls and the worksheet name is .xls]Executive_Report[1]. If you try to change the worksheet name, no matter what you type, Excel complains that "While renaming a sheet or chart, you entered and invalid name... cannot contain any of the following characters : \ / ? * [ or ]". If instead of clicking open, you save the file to disk first, the filename is Executive_Report.xls and the worksheet name is Executive_Report and Excel works fine.
It seems likely this issue is related to Tiles and Struts, although no one else appears to be having the same problem. Any advice or suggestions will be appreciated.
I've attached a screenshot to illustrate problem.