diff options
author | PJ Fanning <fanningpj@apache.org> | 2021-10-07 10:16:23 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2021-10-07 10:16:23 +0000 |
commit | b065bd4b67d210f183da58aa51cb3b64cd42c0b6 (patch) | |
tree | 9fc2681d59a3933e2270342f19717d64c41cac2e /poi | |
parent | 38d4834ba72b7bfd402c48149a1050b4a23329c2 (diff) | |
download | poi-b065bd4b67d210f183da58aa51cb3b64cd42c0b6.tar.gz poi-b065bd4b67d210f183da58aa51cb3b64cd42c0b6.zip |
update javadoc for cell/row copy
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1893963 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi')
-rw-r--r-- | poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFRow.java | 11 | ||||
-rw-r--r-- | poi/src/main/java/org/apache/poi/ss/util/CellUtil.java | 5 |
2 files changed, 11 insertions, 5 deletions
diff --git a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFRow.java b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFRow.java index e73e0a5365..3487e31595 100644 --- a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFRow.java +++ b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFRow.java @@ -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} diff --git a/poi/src/main/java/org/apache/poi/ss/util/CellUtil.java b/poi/src/main/java/org/apache/poi/ss/util/CellUtil.java index 0407550b19..ea54ee8ff2 100644 --- a/poi/src/main/java/org/apache/poi/ss/util/CellUtil.java +++ b/poi/src/main/java/org/apache/poi/ss/util/CellUtil.java @@ -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. * |