Browse Source

update javadoc for cell/row copy

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1893963 13f79535-47bb-0310-9956-ffa450edef68
tags/REL_5_2_0
PJ Fanning 2 years ago
parent
commit
b065bd4b67

+ 11
- 4
poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFRow.java View File

@@ -638,11 +638,14 @@ public class XSSFRow implements Row, Comparable<XSSFRow> {
}

/**
* Copy the cells from srcRow to this row
* Copy the cells from srcRow to this row.
* If this row is not a blank row, this will merge the two rows, overwriting
* the cells in this row with the cells in srcRow
* If srcRow is null, overwrite cells in destination row with blank values, styles, etc per cell copy policy
* srcRow may be from a different sheet in the same workbook
* the cells in this row with the cells in srcRow.
* If srcRow is null, overwrite cells in destination row with blank values, styles, etc per cell copy policy.
*
* Note that if you are copying from a non-XSSF row then you will need to disable style copying
* in the {@link CellCopyPolicy} (XSSF styles are not compatible with HSSF styles, for instance).
*
* @param srcRow the rows to copy from
* @param policy the policy to determine what gets copied
*/
@@ -657,6 +660,10 @@ public class XSSFRow implements Row, Comparable<XSSFRow> {
* the cells in this row with the cells in srcRow
* If srcRow is null, overwrite cells in destination row with blank values, styles, etc per cell copy policy
* srcRow may be from a different sheet in the same workbook
*
* Note that if you are copying from a non-XSSF row then you will need to disable style copying
* in the {@link CellCopyPolicy} (XSSF styles are not compatible with HSSF styles, for instance).
*
* @param srcRow the rows to copy from
* @param policy the policy to determine what gets copied
* @param context the context - see {@link CellCopyContext}

+ 7
- 4
poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFRow.java View File

@@ -801,11 +801,14 @@ public final class HSSFRow implements Row, Comparable<HSSFRow> {
}

/**
* Copy the cells from srcRow to this row
* Copy the cells from srcRow to this row.
* If this row is not a blank row, this will merge the two rows, overwriting
* the cells in this row with the cells in srcRow
* If srcRow is null, overwrite cells in destination row with blank values, styles, etc per cell copy policy
* srcRow may be from a different sheet in the same workbook
* the cells in this row with the cells in srcRow.
* If srcRow is null, overwrite cells in destination row with blank values, styles, etc per cell copy policy.
*
* Note that if you are copying from a non-HSSF row then you will need to disable style copying
* in the {@link CellCopyPolicy} (HSSF styles are not compatible with XSSF styles, for instance).
*
* @param srcRow the rows to copy from
* @param policy the policy to determine what gets copied
* @param context the context - see {@link CellCopyContext}

+ 4
- 1
poi/src/main/java/org/apache/poi/ss/util/CellUtil.java View File

@@ -181,7 +181,10 @@ public final class CellUtil {

/**
* Copy cell value, formula and style, from srcCell per cell copy policy
* If srcCell is null, clears the cell value and cell style per cell copy policy
* If srcCell is null, clears the cell value and cell style per cell copy policy.
*
* Note that if you are copying from a source cell from a different type of then you may need to disable style copying
* in the {@link CellCopyPolicy} (HSSF styles are not compatible with XSSF styles, for instance).
*
* This does not shift references in formulas.
*

Loading…
Cancel
Save