public interface Transformer
Modifier and Type | Method and Description |
---|---|
void |
addImage(AreaRef areaRef,
byte[] imageBytes,
ImageType imageType) |
void |
addImage(AreaRef areaRef,
byte[] imageBytes,
ImageType imageType,
Double scaleX,
Double scaleY) |
void |
adjustTableSize(CellRef ref,
Size size) |
void |
clearCell(CellRef cellRef) |
boolean |
deleteSheet(String sheetName) |
void |
dispose()
Must be called after use.
|
CellData |
getCellData(CellRef cellRef) |
List<CellData> |
getCommentedCells() |
ExceptionHandler |
getExceptionHandler() |
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() |
void |
mergeCells(CellRef ref,
int rows,
int cols) |
void |
resetArea(AreaRef areaRef) |
void |
resetTargetCellRefs() |
void |
setEvaluateFormulas(boolean evaluateFormulas)
This property is used to recalculate all formulas before saving the workbook.
|
void |
setExceptionHandler(ExceptionHandler exceptionHandler) |
void |
setFormula(CellRef cellRef,
String formulaString) |
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 |
setHidden(String sheetName,
boolean hidden) |
void |
setTransformationConfig(TransformationConfig transformationConfig) |
void |
transform(CellRef srcCellRef,
CellRef targetCellRef,
Context context,
boolean updateRowHeight) |
void |
updateRowHeight(String srcSheetName,
int srcRowNum,
String targetSheetName,
int targetRowNum) |
void |
write()
Writes Excel workbook to output stream and disposes the workbook.
|
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.
|
void setTransformationConfig(TransformationConfig transformationConfig)
TransformationConfig getTransformationConfig()
void transform(CellRef srcCellRef, CellRef targetCellRef, Context context, boolean updateRowHeight)
void writeButNotCloseStream() throws IOException
IOException
- -void write() throws IOException
IOException
- -void dispose()
List<CellRef> getTargetCellRef(CellRef cellRef)
cellRef
- a source cell referencevoid resetTargetCellRefs()
void resetArea(AreaRef areaRef)
void clearCell(CellRef cellRef)
void addImage(AreaRef areaRef, byte[] imageBytes, ImageType imageType, Double scaleX, Double scaleY)
boolean deleteSheet(String sheetName)
void setHidden(String sheetName, boolean hidden)
void updateRowHeight(String srcSheetName, int srcRowNum, String targetSheetName, int targetRowNum)
void mergeCells(CellRef ref, int rows, int cols)
boolean isEvaluateFormulas()
workbook.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)
void setEvaluateFormulas(boolean evaluateFormulas)
evaluateFormulas
- true: calls workbook.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)
boolean isFullFormulaRecalculationOnOpening()
void setFullFormulaRecalculationOnOpening(boolean fullFormulaRecalculationOnOpening)
fullFormulaRecalculationOnOpening
- false: do nothing (default value),
true: activate recalculation when openingboolean isForwardOnly()
ExceptionHandler getExceptionHandler()
void setExceptionHandler(ExceptionHandler exceptionHandler)
exceptionHandler
- not nullCopyright © 2023. All rights reserved.