Changeset 297 for trunk/grails-app/taglib
- Timestamp:
- Mar 22, 2010, 2:18:30 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/taglib/dbnp/importer/ImporterTagLib.groovy
r283 r297 17 17 import dbnp.studycapturing.Template 18 18 import dbnp.studycapturing.TemplateFieldType 19 import org.apache.poi.hssf.usermodel.HSSFCell 20 import org.apache.poi.ss.usermodel.DataFormatter 19 21 20 22 class ImporterTagLib { … … 160 162 out << res 161 163 } 164 165 /** 166 * @param cell HSSFCell variable 167 * @return good representation of variable (instead of toString()) 168 */ 169 def displayCell = { attrs -> 170 def cell = attrs['cell'] 171 def df = new DataFormatter() 172 173 switch (cell.getCellType()) { 174 case HSSFCell.CELL_TYPE_STRING : out << cell.getStringCellValue() 175 break 176 case HSSFCell.CELL_TYPE_NUMERIC : out << df.formatCellValue(cell) 177 break 178 } 179 } 162 180 }
Note: See TracChangeset
for help on using the changeset viewer.