The following comment has been added to this issue:
Author: Karsten Voges
Created: Wed, 12 Jan 2005 6:33 AM
Body:
inserted the following method to escape tabs and returns:
/***
* Escaping for excel format.
* <ul>
* <li>Escaped to remove tabs and returns. Only \n is valid for
excel</li>
* </ul>
* @see
org.displaytag.export.BaseExportView#escapeColumnValue(java.lang.Object)
*/
protected String escapeColumnValue(Object value) {
if (value != null) {
String returnString = value.toString();
// escape the String to get the tabs, returns, newline
explicit as \t \r \n
returnString =
StringEscapeUtils.escapeJava(StringUtils.trimToEmpty(returnString));
// remove tabs, insert four whitespaces instead
returnString =
StringUtils.replace(StringUtils.trim(returnString), "\\t", " ");
// remove the return, only newline valid in excel
returnString =
StringUtils.replace(StringUtils.trim(returnString), "\\r", " ");
// unescape so that \n gets back to newline
returnString =
StringEscapeUtils.unescapeJava(returnString);
return returnString;
}
return null;
}
---------------------------------------------------------------------
View this comment:
http://jira.codehaus.org/browse/DISPL-162?page=comments#action_28871
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/browse/DISPL-162
Here is an overview of the issue:
---------------------------------------------------------------------
Key: DISPL-162
Summary: Excel export using POI
Type: New Feature
Status: Unassigned
Priority: Minor
Original Estimate: Unknown
Time Spent: Unknown
Remaining: Unknown
Project: DisplayTag
Components:
Export
Assignee:
Reporter: raw
Created: Wed, 29 Dec 2004 6:01 AM
Updated: Wed, 12 Jan 2005 6:33 AM
Description:
It would be nice to use POI to export excel files.
The actual export mecanism don't translate well things like dates, or numbers
(i18n issues).
---------------------------------------------------------------------
JIRA INFORMATION:
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
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
displaytag-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel