-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathExcelExporter.java
More file actions
47 lines (38 loc) · 1.09 KB
/
ExcelExporter.java
File metadata and controls
47 lines (38 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package org.vaadin.haijian;
import org.vaadin.haijian.filegenerator.ExcelFileBuilder;
import org.vaadin.haijian.filegenerator.FileBuilder;
import com.vaadin.data.Container;
import com.vaadin.ui.Table;
public class ExcelExporter extends Exporter {
public ExcelExporter() {
super();
}
public ExcelExporter(Table table) {
super(table);
}
public ExcelExporter(Container container, Object[] visibleColumns) {
super(container, visibleColumns);
}
public ExcelExporter(Container container) {
super(container);
}
@Override
protected FileBuilder createFileBuilder(Container container) {
return new ExcelFileBuilder(container);
}
@Override
protected FileBuilder createFileBuilder(Table table) {
return new ExcelFileBuilder(table);
}
@Override
protected String getDownloadFileName() {
if(downloadFileName == null){
return "exported-excel.xls";
}
if(downloadFileName.endsWith(".xls")){
return downloadFileName;
}else{
return downloadFileName + ".xls";
}
}
}