Add a function that copies a cell value from another cell, and if the source cell contains a formula, shifts that formula. Currently POI only contains methods to copy entire rows (XSSFSheet.copyRows).
What APIs do you need? Copy cell to (row, column) Copy cell to (sheet, row, column) Copy cell to (workbook, sheet, row, column) Copy cell to (cell range) Copy cell to (sheet, cell range) Shift formula(formula string, number of rows, number of columns, collection of case-insensitive sheet names that are being shifted, whether absolute row and column references should be shifted (copy vs move mode)
I'm opening this request after your very suggestion, so you have more insight on what is missing than I do. Maybe some instance method sourceCell.copyTo(Cell destinationCell) or destinationCell.copyFrom(Cell sourceCell)? Or some static method Cell.copyCell(Cell source, Cell dest) on the same lines of XSSFSheet.copyrows?
What I am trying to figure out is whether you are copying cells on the same sheet, copying cells between sheets, or copying cells between workbooks. The implementation effort increases significant between workbooks, so I won't implement that if it's not needed.
I need to copy between sheets on same workbook. Also regarding the implementation of XSSFSheet.copyRows if it doesn't allow it yet. Thanks very much.