Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/316.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 使用JOpenDocument复制行_Java_Jopendocument - Fatal编程技术网

Java 使用JOpenDocument复制行

Java 使用JOpenDocument复制行,java,jopendocument,Java,Jopendocument,我尝试使用JopenDocumentV1.3多次复制一行,但失败惨重 以下是我的代码片段: private void copyRow(Sheet sheet, int templateRow, int target){ sheet.ensureRowCount(target); sheet.duplicateRows(templateRow, 1, 1); sheet.insertDuplicatedRows(templateRow, target);

我尝试使用JopenDocumentV1.3多次复制一行,但失败惨重

以下是我的代码片段:

   private void copyRow(Sheet sheet, int templateRow, int target){
      sheet.ensureRowCount(target);
      sheet.duplicateRows(templateRow, 1, 1);
      sheet.insertDuplicatedRows(templateRow, target);
   }
上面的代码不会更改任何行,也不会显示任何错误

我知道我可以分别复制每个单元格,但我认为如果有一种方法可以同时复制所有单元格,那么效率应该会更高

提前谢谢