本文整理了Java中org.apache.poi.xssf.usermodel.XSSFSheet.copyRows()
方法的一些代码示例,展示了XSSFSheet.copyRows()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSSFSheet.copyRows()
方法的具体详情如下:
包路径:org.apache.poi.xssf.usermodel.XSSFSheet
类名称:XSSFSheet
方法名:copyRows
[英]Copies rows between srcStartRow and srcEndRow to the same sheet, starting at destStartRow Convenience function for #copyRows(List,int,CellCopyPolicy)Equivalent to copyRows(getRows(srcStartRow, srcEndRow, false), destStartRow, cellCopyPolicy)
[中]将srcStartRow和srcEndRow之间的行复制到同一工作表中,从destStartRow便利函数开始,用于#copyRows(List,int,CellCopyPolicy)等效于copyRows(getRows(srcStartRow,srcEndRow,false),destStartRow,CellCopyPolicy)
代码示例来源:origin: org.apache.poi/poi-ooxml
/**
* Copies rows between srcStartRow and srcEndRow to the same sheet, starting at destStartRow
* Convenience function for {@link #copyRows(List, int, CellCopyPolicy)}
*
* Equivalent to copyRows(getRows(srcStartRow, srcEndRow, false), destStartRow, cellCopyPolicy)
*
* @param srcStartRow the index of the first row to copy the cells from in this sheet
* @param srcEndRow the index of the last row to copy the cells from in this sheet
* @param destStartRow the index of the first row to copy the cells to in this sheet
* @param cellCopyPolicy the policy to use to determine how cells are copied
*/
@Beta
public void copyRows(int srcStartRow, int srcEndRow, int destStartRow, CellCopyPolicy cellCopyPolicy) {
final List<XSSFRow> srcRows = getRows(srcStartRow, srcEndRow, false); //FIXME: should be false, no need to create rows where src is only to copy them to dest
copyRows(srcRows, destStartRow, cellCopyPolicy);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* Copies rows between srcStartRow and srcEndRow to the same sheet, starting at destStartRow
* Convenience function for {@link #copyRows(List, int, CellCopyPolicy)}
*
* Equivalent to copyRows(getRows(srcStartRow, srcEndRow, false), destStartRow, cellCopyPolicy)
*
* @param srcStartRow the index of the first row to copy the cells from in this sheet
* @param srcEndRow the index of the last row to copy the cells from in this sheet
* @param destStartRow the index of the first row to copy the cells to in this sheet
* @param cellCopyPolicy the policy to use to determine how cells are copied
*/
@Beta
public void copyRows(int srcStartRow, int srcEndRow, int destStartRow, CellCopyPolicy cellCopyPolicy) {
final List<XSSFRow> srcRows = getRows(srcStartRow, srcEndRow, false); //FIXME: should be false, no need to create rows where src is only to copy them to dest
copyRows(srcRows, destStartRow, cellCopyPolicy);
}
内容来源于网络,如有侵权,请联系作者删除!