Export to Excel in IE - Invalid Characters in Worksheet Name
------------------------------------------------------------
Key: DISPL-398
URL: http://jira.codehaus.org/browse/DISPL-398
Project: DisplayTag
Issue Type: Bug
Affects Versions: 1.1
Reporter: Michael Watts
Attachments: exec_report.gif
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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
displaytag-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel