public abstract class AbstractExcelExporter extends AbstractExporter
Modifier and Type | Field and Description |
---|---|
protected boolean |
_exportCache |
protected Map<SColor,Color> |
colorTable |
protected static int |
DEFAULT_ROW_HEIGHT |
protected Map<Integer,Integer> |
exportedPicDataMap |
protected Map<SFont,Font> |
fontTable |
protected Map<SCellStyle,CellStyle> |
styleTable
The map stores the exported
CellStyle during exporting, so that
we can reuse them for exporting other cells. |
protected Map<STableStyle,TableStyle> |
tbStyleTable |
protected Workbook |
workbook
Exporting destination, POI book model
|
Constructor and Description |
---|
AbstractExcelExporter() |
Modifier and Type | Method and Description |
---|---|
protected void |
addPOIDxfCellStyle(SExtraStyle extraStyle)
Add DxfCellStyle as poi Dxf.
|
protected void |
addPOITableStyle(STableStyle tableStyle)
Add TableStyle as poi TableStyle
|
protected abstract Workbook |
createPoiBook() |
void |
export(SBook book,
OutputStream fos)
Export the model according to reversed depended order: book, sheet,
defined name, cells, chart, pictures, validation.
|
protected abstract void |
exportAutoFilter(SSheet sheet,
Sheet poiSheet) |
protected void |
exportCell(Row poiRow,
SCell cell) |
protected abstract void |
exportChart(SSheet sheet,
Sheet poiSheet) |
protected abstract void |
exportColumnArray(SSheet sheet,
Sheet poiSheet,
SColumnArray columnArr) |
protected abstract void |
exportConditionalFormatting(SSheet sheet,
Sheet poiSheet) |
protected void |
exportMergedRegions(SSheet sheet,
Sheet poiSheet) |
protected void |
exportNamedRange(SBook book) |
protected abstract void |
exportPassword(SSheet sheet,
Sheet poiSheet) |
protected abstract void |
exportPicture(SSheet sheet,
Sheet poiSheet) |
protected void |
exportPictureData(SBook book) |
protected void |
exportRow(SSheet sheet,
Sheet poiSheet,
SRow row) |
protected void |
exportRowColumn(SSheet sheet,
Sheet poiSheet) |
protected void |
exportSheet(SSheet sheet) |
protected void |
exportSheetProtection(SSheet sheet,
Sheet poiSheet)
POI SheetProtection.
|
protected abstract int |
exportTables(SSheet sheet,
Sheet poiSheet,
int tbId) |
protected abstract void |
exportValidation(SSheet sheet,
Sheet poiSheet) |
protected boolean |
isExportCache()
Returns whether export cached value into excel file.
|
void |
setExportCache(boolean b)
Set whether export cached value into excel file(must be called before
export() is called.
|
protected CellStyle |
toPOICellStyle(SCellStyle cellStyle) |
protected Color |
toPOIColor(SColor color) |
protected CellStyle |
toPOIDefaultCellStyle(SCellStyle cellStyle) |
protected Font |
toPOIFont(SFont font)
Convert ZSS Font into POI Font.
|
protected NamedStyle |
toPOINamedStyle(SNamedStyle cellStyle) |
protected RichTextString |
toPOIRichText(SRichText richText) |
export, export, export
protected static final int DEFAULT_ROW_HEIGHT
protected Workbook workbook
protected Map<SCellStyle,CellStyle> styleTable
CellStyle
during exporting, so that
we can reuse them for exporting other cells.protected Map<STableStyle,TableStyle> tbStyleTable
protected boolean _exportCache
protected abstract void exportColumnArray(SSheet sheet, Sheet poiSheet, SColumnArray columnArr)
protected abstract Workbook createPoiBook()
protected abstract void exportConditionalFormatting(SSheet sheet, Sheet poiSheet)
public void export(SBook book, OutputStream fos) throws IOException
book
- the book to exportfos
- the output stream to store dataIOException
protected void exportPictureData(SBook book)
protected void exportNamedRange(SBook book)
protected void exportSheet(SSheet sheet)
protected RichTextString toPOIRichText(SRichText richText)
protected NamedStyle toPOINamedStyle(SNamedStyle cellStyle)
protected CellStyle toPOIDefaultCellStyle(SCellStyle cellStyle)
protected CellStyle toPOICellStyle(SCellStyle cellStyle)
protected Font toPOIFont(SFont font)
font
- protected void exportSheetProtection(SSheet sheet, Sheet poiSheet)
sheet
- destination sheetpoiSheet
- source POI sheetpublic void setExportCache(boolean b)
b
- protected boolean isExportCache()
protected void addPOIDxfCellStyle(SExtraStyle extraStyle)
extraStyle
- protected void addPOITableStyle(STableStyle tableStyle)
tableStyle
- Copyright © 2020. All rights reserved.