WriteWorkbook.java
4.64 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
package com.taover.easyexcel.write.metadata;
import java.io.File;
import java.io.InputStream;
import java.io.OutputStream;
import com.taover.easyexcel.support.ExcelTypeEnum;
import com.taover.easyexcel.write.handler.WriteHandler;
/**
* Workbook
*
* @author Jiaju Zhuang
**/
public class WriteWorkbook extends WriteBasicParameter {
/**
* Excel type.The default is xlsx
*/
private ExcelTypeEnum excelType;
/**
* Final output file
* <p>
* If 'outputStream' and 'file' all not empty,file first
*/
private File file;
/**
* Final output stream
* <p>
* If 'outputStream' and 'file' all not empty,file first
*/
private OutputStream outputStream;
/**
* Template input stream
* <p>
* If 'inputStream' and 'file' all not empty,file first
*/
private InputStream templateInputStream;
/**
* Template file
* <p>
* If 'inputStream' and 'file' all not empty,file first
*/
private File templateFile;
/**
* Default true.
*/
private Boolean autoCloseStream;
/**
* Mandatory use 'inputStream' .Default is false
*/
private Boolean mandatoryUseInputStream;
/**
* Whether the encryption
* <p>
* WARRING:Encryption is when the entire file is read into memory, so it is very memory intensive.
*
*/
private String password;
/**
* Write excel in memory. Default false,the cache file is created and finally written to excel.
* <p>
* Comment and RichTextString are only supported in memory mode.
*/
private Boolean inMemory;
/**
* Excel is also written in the event of an exception being thrown.The default false.
*/
private Boolean writeExcelOnException;
/**
* The default is all excel objects.Default is true.
* <p>
* if true , you can use {@link com.taover.easyexcel.annotation.ExcelIgnore} ignore a field.
* <p>
* if false , you must use {@link com.taover.easyexcel.annotation.ExcelProperty} to use a filed.
*
* @deprecated Just to be compatible with historical data, The default is always going to be convert all filed.
*/
@Deprecated
private Boolean convertAllFiled;
/**
* Write handler
*
* @deprecated please use {@link WriteHandler}
*/
@Deprecated
private com.taover.easyexcel.event.WriteHandler writeHandler;
public ExcelTypeEnum getExcelType() {
return excelType;
}
public void setExcelType(ExcelTypeEnum excelType) {
this.excelType = excelType;
}
public File getFile() {
return file;
}
public void setFile(File file) {
this.file = file;
}
public OutputStream getOutputStream() {
return outputStream;
}
public void setOutputStream(OutputStream outputStream) {
this.outputStream = outputStream;
}
public InputStream getTemplateInputStream() {
return templateInputStream;
}
public void setTemplateInputStream(InputStream templateInputStream) {
this.templateInputStream = templateInputStream;
}
public File getTemplateFile() {
return templateFile;
}
public void setTemplateFile(File templateFile) {
this.templateFile = templateFile;
}
public Boolean getAutoCloseStream() {
return autoCloseStream;
}
public void setAutoCloseStream(Boolean autoCloseStream) {
this.autoCloseStream = autoCloseStream;
}
public Boolean getMandatoryUseInputStream() {
return mandatoryUseInputStream;
}
public void setMandatoryUseInputStream(Boolean mandatoryUseInputStream) {
this.mandatoryUseInputStream = mandatoryUseInputStream;
}
public Boolean getConvertAllFiled() {
return convertAllFiled;
}
public void setConvertAllFiled(Boolean convertAllFiled) {
this.convertAllFiled = convertAllFiled;
}
public com.taover.easyexcel.event.WriteHandler getWriteHandler() {
return writeHandler;
}
public void setWriteHandler(com.taover.easyexcel.event.WriteHandler writeHandler) {
this.writeHandler = writeHandler;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public Boolean getInMemory() {
return inMemory;
}
public void setInMemory(Boolean inMemory) {
this.inMemory = inMemory;
}
public Boolean getWriteExcelOnException() {
return writeExcelOnException;
}
public void setWriteExcelOnException(Boolean writeExcelOnException) {
this.writeExcelOnException = writeExcelOnException;
}
}