← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2835: Fixed bug 'Excel reports are corrupted by special characters in report name'

 

------------------------------------------------------------
revno: 2835
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-02-11 09:32:38 +0100
message:
  Fixed bug 'Excel reports are corrupted by special characters in report name'
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-01-17 16:17:06 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/result/GridXlsResult.java	2011-02-11 08:32:38 +0000
@@ -115,7 +115,7 @@
 
         WritableWorkbook workbook = Workbook.createWorkbook( out );
 
-        String sheetName = StringUtils.defaultIfEmpty( grid.getTitle(), DEFAULT_SHEET_NAME );
+        String sheetName = CodecUtils.filenameEncode( StringUtils.defaultIfEmpty( grid.getTitle(), DEFAULT_SHEET_NAME ) );
         
         WritableSheet sheet = workbook.createSheet( sheetName, 0 );