dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #11118
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3116: Grid excel result did not detect numbers properly
------------------------------------------------------------
revno: 3116
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-03-22 09:45:00 +0100
message:
Grid excel result did not detect numbers properly
modified:
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/result/GridXlsResult.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/result/GridXlsResult.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/result/GridXlsResult.java 2011-02-23 14:27:49 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/result/GridXlsResult.java 2011-03-22 08:45:00 +0000
@@ -45,6 +45,7 @@
import org.hisp.dhis.common.Grid;
import org.hisp.dhis.common.GridHeader;
import org.hisp.dhis.system.util.CodecUtils;
+import org.hisp.dhis.system.util.MathUtils;
import org.hisp.dhis.util.ContextUtils;
import com.opensymphony.xwork2.ActionInvocation;
@@ -139,7 +140,7 @@
for ( Object column : row )
{
- if ( column != null && column instanceof Number )
+ if ( column != null && MathUtils.isNumeric( String.valueOf( column ) ) )
{
sheet.addCell( new Number( columnIndex++, rowNumber, Double.valueOf( String.valueOf( column ) ), FORMAT_TEXT ) );
}