Package org.apache.poi.ss.usermodel
Class RangeCopier
- java.lang.Object
-
- org.apache.poi.ss.usermodel.RangeCopier
-
- Direct Known Subclasses:
HSSFRangeCopier
@Beta public abstract class RangeCopier extends Object
-
-
Constructor Summary
Constructors Constructor Description RangeCopier(Sheet sheet)
RangeCopier(Sheet sourceSheet, Sheet destSheet)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
adjustCellReferencesInsideFormula(Cell cell, Sheet destSheet, int deltaX, int deltaY)
protected boolean
adjustInBothDirections(Ptg[] ptgs, int sheetIndex, int deltaX, int deltaY)
static void
cloneCellContent(Cell srcCell, Cell destCell, Map<Integer,CellStyle> styleMap)
void
copyRange(CellRangeAddress tilePatternRange, CellRangeAddress tileDestRange)
Uses input pattern to tile destination region, overwriting existing content.void
copyRange(CellRangeAddress tilePatternRange, CellRangeAddress tileDestRange, boolean copyStyles, boolean copyMergedRanges)
Uses input pattern to tile destination region, overwriting existing content.
-
-
-
Method Detail
-
copyRange
public void copyRange(CellRangeAddress tilePatternRange, CellRangeAddress tileDestRange)
Uses input pattern to tile destination region, overwriting existing content. Works in following manner : 1.Start from top-left of destination. 2.Paste source but only inside of destination borders. 3.If there is space left on right or bottom side of copy, process it as in step 2.- Parameters:
tilePatternRange
- source range which should be copied in tiled mannertileDestRange
- destination range, which should be overridden
-
copyRange
public void copyRange(CellRangeAddress tilePatternRange, CellRangeAddress tileDestRange, boolean copyStyles, boolean copyMergedRanges)
Uses input pattern to tile destination region, overwriting existing content. Works in following manner : 1.Start from top-left of destination. 2.Paste source but only inside of destination borders. 3.If there is space left on right or bottom side of copy, process it as in step 2.- Parameters:
tilePatternRange
- source range which should be copied in tiled mannertileDestRange
- destination range, which should be overriddencopyStyles
- whether to copy the cell stylescopyMergedRanges
- whether to copy merged ranges- Since:
- 5.0.0
-
adjustCellReferencesInsideFormula
protected abstract void adjustCellReferencesInsideFormula(Cell cell, Sheet destSheet, int deltaX, int deltaY)
-
adjustInBothDirections
protected boolean adjustInBothDirections(Ptg[] ptgs, int sheetIndex, int deltaX, int deltaY)
-
-