I've just seen that there's a JIRA on that case:
http://jira.codehaus.org/browse/DISPL-537
Is it really a bug?
Thanks.
_____
From: David Pilato [mailto:[EMAIL PROTECTED]
Sent: mercredi 18 juin 2008 16:09
To: 'displaytag-user@lists.sourceforge.net'
Subject: Decorator and Export
Hi everybody on the list ;-),
I'm trying to export some data to Excel:
- Column A : String
- Column B : Long
- Column C : Date
When I open the Excel generated file, each column is shown as String.
So I can't make SUM for example for the Column B.
I tried to understand the source code and I saw that the Excel Export Filter
(HssfTableWriter) can do the job correctly because the method
writeColumnValue(Object value, Column column) verify if the object is an
instance of Number or Date.
My problem is that the Object that is evaluated by writeColumnValue(Object
value, Column column) is ALWAYS a String.
So I tried to look further to find out what I did wrong.
I found that when you decorate an object, each value is converted as a
String, even if you don't specify the method for this property in your
Decorator class.
So, I suppose that I have to set export.decorated=false in the
displaytag.properties file.
It doesn't seem to work.
I also tried to set
<display:setProperty name="decorator.media.html" value="MyWrapper" />
It doesn't seem to work.
I also tried to suppress the Decorator so I have only primary data.
But it doesn't work.
What am I doing wrong?
I really don't understand why my Long object (I can see it as a Long in the
debug mode in the displaytag Object) is transformed as a String
automatically.
Anyone has any idea on this?
Somebody has already exported to Excel some Date and Long objects?
I'm sure that I'm doing something really stupid but I can't find it.
Thanks a lot,
David.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
displaytag-user mailing list
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user