Bug 61851 - Add copy cell feature
Summary: Add copy cell feature
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: SS Common (show other bugs)
Version: 3.17-FINAL
Hardware: PC All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-03 15:11 UTC by Luca
Modified: 2017-12-06 11:25 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luca 2017-12-03 15:11:54 UTC
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).
Comment 1 Javen O'Neal 2017-12-03 17:01:16 UTC
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)
Comment 2 Luca 2017-12-04 08:42:59 UTC
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?
Comment 3 Javen O'Neal 2017-12-04 17:18:20 UTC
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.
Comment 4 Luca 2017-12-04 18:46:37 UTC
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.