public class ExcelExport
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
ExcelExport.ExportResult
The inner Class ExportResult.
|
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
downloadDir
The download dir.
|
protected org.apache.log4j.Logger |
logger
The logger.
|
private static java.lang.String |
PROP_FILE
Name of the properties file which must exist on the classpath.
|
Constructor and Description |
---|
ExcelExport()
The constructor loads in variables from the properties file.
|
Modifier and Type | Method and Description |
---|---|
ExcelExport.ExportResult |
acceptImage(byte[] bd,
int width,
int height)
Accept image.
|
java.lang.String |
echo(java.lang.String string)
Method for debugging remote object calls.
|
private ExcelExport.ExportResult |
exportData(java.io.File file,
java.util.Collection<java.lang.String> columns,
java.util.Collection<java.util.HashMap<java.lang.String,java.lang.Object>> data)
Export data.
|
ExcelExport.ExportResult |
exportData(java.lang.String fileName,
java.util.Collection<java.lang.String> columns,
java.util.Collection<java.util.HashMap<java.lang.String,java.lang.Object>> data)
Export data.
|
protected org.apache.log4j.Logger logger
private static final java.lang.String PROP_FILE
private java.lang.String downloadDir
public ExcelExport()
public java.lang.String echo(java.lang.String string)
string
- the stringpublic ExcelExport.ExportResult exportData(java.lang.String fileName, java.util.Collection<java.lang.String> columns, java.util.Collection<java.util.HashMap<java.lang.String,java.lang.Object>> data)
fileName
- the file name to save tocolumns
- the Collectiondata
- the Collectionprivate ExcelExport.ExportResult exportData(java.io.File file, java.util.Collection<java.lang.String> columns, java.util.Collection<java.util.HashMap<java.lang.String,java.lang.Object>> data)
file
- the File handlecolumns
- the Collectiondata
- the Collectionpublic ExcelExport.ExportResult acceptImage(byte[] bd, int width, int height)
bd
- the byte array containing the imagewidth
- the width in pixelsheight
- the height in pixels