1 12 package org.displaytag.export; 13 14 import org.apache.commons.lang.StringUtils; 15 import org.displaytag.model.TableModel; 16 17 18 23 public class ExcelView extends BaseExportView 24 { 25 26 29 public void setParameters(TableModel tableModel, boolean exportFullList, boolean includeHeader, 30 boolean decorateValues) 31 { 32 super.setParameters(tableModel, exportFullList, includeHeader, decorateValues); 33 } 34 35 39 public String getMimeType() 40 { 41 return "application/vnd.ms-excel"; } 43 44 47 protected String getRowEnd() 48 { 49 return "\n"; } 51 52 55 protected String getCellEnd() 56 { 57 return "\t"; } 59 60 64 protected boolean getAlwaysAppendCellEnd() 65 { 66 return false; 67 } 68 69 73 protected boolean getAlwaysAppendRowEnd() 74 { 75 return false; 76 } 77 78 86 protected String escapeColumnValue(Object value) 87 { 88 if (value != null) 89 { 90 return "\"" + StringUtils.replace(StringUtils.trim(value.toString()), "\"", "\"\"") + "\""; } 95 96 return null; 97 } 98 99 } 100 | Popular Tags |