1

I am using SXSSF to write large numbers of data in one excel-File.

I have seen that 'cloneSheet' method isn't implemented:

/**
 * Create an Sheet from an existing sheet in the Workbook.
 *
 * @return Sheet representing the cloned sheet.
 */
public Sheet cloneSheet(int sheetNum)
{
    throw new RuntimeException("NotImplemented");
}

But I don't understand why. Is it logically correct that it's missing? Or is it a bug?

I look forward to your answers and help to be able to clone sheets with SXSSF.

Best Regards, Louisa.

Louisa
  • 55
  • 10
  • SXSSF only does things that can work in a streaming manner, which cloning can't. Can you switch to XSSF for your cloning? – Gagravarr Mar 17 '15 at 11:58
  • @Gagravarr Thank you for the explanation. Unfortunately I have to use SXSSF because I have to print large data input. So the only way I see is to have all sheets in my Excel template first, and when I don't use them, I remove them.... it's like a workaround to solve it. Or do you see another solution? – Louisa Mar 17 '15 at 13:12
  • Deleting is normally quicker and easier than adding, so give it a try! – Gagravarr Mar 17 '15 at 13:18

1 Answers1

1

Thank you @Gagravarr: "SXSSF only does things that can work in a streaming manner, which cloning can't."

I resolve it to have all sheets in my Excel template first, and when I don't use them, I remove them....

Louisa
  • 55
  • 10