public abstract class ExcelBaseWriter extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected ExcelWriterContext |
context |
protected String |
defaultSheetName |
protected javax.servlet.http.HttpServletResponse |
response |
protected ExcelWriterResolver |
writerResolver |
| 限定符 | 构造器和说明 |
|---|---|
protected |
ExcelBaseWriter(ExcelWriterContext context,
int windowSize,
javax.servlet.http.HttpServletResponse response,
boolean initDefaultStyle) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
addListenerCache(ExcelWriteListener excelWriteListener)
Add write listener to cache
|
protected void |
chooseResolver(ExcelWriterContext context,
int windowSize)
Choose resolver
|
void |
createSheet(String sheetName)
Create excel sheet
|
protected void |
delListenerCache(Class<? extends ExcelWriteListener> key,
boolean all)
Deletes the current listener cache, save the listener marked with the @ListenerNative annotation
|
void |
flush()
Flush all content to excel of the cache
|
void |
flushToLocal(String path)
Flush all content to excel of the cache to local
|
protected abstract void |
initStyle()
Init default style listener
|
protected ExcelWriterContext context
protected javax.servlet.http.HttpServletResponse response
protected ExcelWriterResolver writerResolver
protected ExcelBaseWriter(ExcelWriterContext context, int windowSize, javax.servlet.http.HttpServletResponse response, boolean initDefaultStyle)
protected abstract void initStyle()
protected void chooseResolver(ExcelWriterContext context, int windowSize)
context - Excel write contextwindowSize - Window size, which is flushed to disk when exported
if the data that has been written out exceeds the specified sizepublic void flush()
public void flushToLocal(String path)
path - Absolute path to the directory where the file is storedpublic void createSheet(String sheetName)
sheetName - sheet nameprotected void addListenerCache(ExcelWriteListener excelWriteListener)
excelWriteListener - Read listenerprotected void delListenerCache(Class<? extends ExcelWriteListener> key, boolean all)
all - Whether to delete listeners flagged by @ListenerNativekey - { ExcelStyleWriteListener.class
ExcelCascadingDropdownBoxListener.class
ExcelCellWriteListener.class
ExcelRowWriteListener.class
ExcelSheetWriteListener.class
ExcelWorkbookWriteListener.class
}Copyright © 2021. All rights reserved.