public abstract class AbstractTransformer extends Object implements Transformer
Transformer interface methods| Modifier and Type | Field and Description |
|---|---|
protected Map<String,SheetData> |
sheetMap |
| Constructor and Description |
|---|
AbstractTransformer() |
| Modifier and Type | Method and Description |
|---|---|
void |
addImage(AreaRef areaRef,
byte[] imageBytes,
ImageType imageType,
Double scaleX,
Double scaleY) |
void |
adjustTableSize(CellRef ref,
Size size) |
boolean |
deleteSheet(String sheetName) |
void |
dispose()
Must be called after use.
|
CellData |
getCellData(CellRef cellRef) |
Set<CellData> |
getFormulaCells() |
List<CellRef> |
getTargetCellRef(CellRef cellRef) |
TransformationConfig |
getTransformationConfig() |
boolean |
isEvaluateFormulas()
This property is used to recalculate all formulas before saving the workbook.
|
boolean |
isForwardOnly() |
boolean |
isFullFormulaRecalculationOnOpening() |
boolean |
isIgnoreColumnProps() |
boolean |
isIgnoreRowProps() |
void |
mergeCells(CellRef ref,
int rows,
int cols) |
void |
resetTargetCellRefs() |
void |
setEvaluateFormulas(boolean evaluateFormulas)
This option does not work for streaming.
|
void |
setFullFormulaRecalculationOnOpening(boolean fullFormulaRecalculationOnOpening)
If you set this option to true, all formulas will be recalculated when the file is opened in MS Excel.
|
void |
setIgnoreColumnProps(boolean ignoreColumnProps) |
void |
setIgnoreRowProps(boolean ignoreRowProps) |
void |
setTransformationConfig(TransformationConfig transformationConfig) |
void |
writeButNotCloseStream()
Writes Excel workbook to output stream but not close the stream
designed to use with ZipOutputStream or other OutputStream
for creates several xls files one time.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddImage, clearCell, getCommentedCells, resetArea, setFormula, setHidden, transform, updateRowHeight, writepublic List<CellRef> getTargetCellRef(CellRef cellRef)
getTargetCellRef in interface TransformercellRef - a source cell referencepublic void resetTargetCellRefs()
resetTargetCellRefs in interface Transformerpublic CellData getCellData(CellRef cellRef)
getCellData in interface Transformerpublic boolean isIgnoreColumnProps()
public void setIgnoreColumnProps(boolean ignoreColumnProps)
public boolean isIgnoreRowProps()
public void setIgnoreRowProps(boolean ignoreRowProps)
public TransformationConfig getTransformationConfig()
getTransformationConfig in interface Transformerpublic void setTransformationConfig(TransformationConfig transformationConfig)
setTransformationConfig in interface Transformerpublic Set<CellData> getFormulaCells()
getFormulaCells in interface Transformerpublic boolean deleteSheet(String sheetName)
deleteSheet in interface Transformerpublic void adjustTableSize(CellRef ref, Size size)
adjustTableSize in interface Transformerpublic void dispose()
Transformerdispose in interface Transformerpublic void mergeCells(CellRef ref, int rows, int cols)
mergeCells in interface Transformerpublic void writeButNotCloseStream()
throws IOException
TransformerwriteButNotCloseStream in interface TransformerIOException - -public void addImage(AreaRef areaRef, byte[] imageBytes, ImageType imageType, Double scaleX, Double scaleY)
addImage in interface Transformerpublic boolean isEvaluateFormulas()
TransformerisEvaluateFormulas in interface Transformerworkbook.getCreationHelper().createFormulaEvaluator().evaluateAll()
before writing the workbook. Please have a look at the POI documentation for more details.
This does not work for streaming.
Please be aware that POI supports only a subset of Excel formulas.
If an unsupported formula is in the template the evaluation will fail.
false (default): do nothing (hopefully MS Excel will recalculate all formulas while opening the file)
public boolean isFullFormulaRecalculationOnOpening()
isFullFormulaRecalculationOnOpening in interface Transformerpublic void setFullFormulaRecalculationOnOpening(boolean fullFormulaRecalculationOnOpening)
TransformersetFullFormulaRecalculationOnOpening in interface TransformerfullFormulaRecalculationOnOpening - false: do nothing (default value),
true: activate recalculation when openingpublic void setEvaluateFormulas(boolean evaluateFormulas)
setEvaluateFormulas in interface TransformerevaluateFormulas - false: formulas will be evaluated by MS Excel when opening the Excel file;
true (default): evaluate formulas before writing.public boolean isForwardOnly()
isForwardOnly in interface TransformerCopyright © 2021. All rights reserved.