-
New Feature
-
Resolution: Won't Do
-
Normal
-
None
-
3.8.2
-
None
-
Security Level: Jimmy
-
Sprint 4, Sprint 8
When copying a column range like:
private String TABLE_RANGE = "A:E"; Range source = Ranges.range(templateSheet, TABLE_RANGE); Range destination = Ranges.range(newSheet, TABLE_AREA); source.paste(destination);
ZSS will actually copy A1: E1048576 and cause out of memory exception.
proposed solution
Optimize the range to copy before copying.
only copy the range with the last row that contains data of that column range. For example, in A:E the last row that contains data is 300, then zss turn the range into A1:E300
debug info
- copy the whole row also has the similar issue, and it will include the max column, 16384. Then, it takes a very long time.
workaround
- skip blank cells
// current workaround, skip blank cells source.pasteSpecial(destination, PasteType.ALL, PasteOperation.NONE, true, false);
- specify a smaller copying range
- relates to
-
KEIKAI-2 Optimize copying range when copying a whole column
- Closed