Copy range issue

Hi. We have update library version from 21.5 to 21.12 and found issue with range copying. Check out please following example:

 @Test
    void copyRange() throws Exception {
        Workbook workbook = new Workbook("E://test1.xlsx");
        Cells cells = workbook.getWorksheets().get(0).getCells();
        try {
            Range source = cells.createRange("J1:J17");
            Range range = cells.createRange("K1:AK17");

            PasteOptions options = new PasteOptions();
            options.setPasteType(PasteType.ALL);
            range.copy(source, options);

            workbook.save("E://test_result.xlsx");
        } catch (Exception e) {
            throw new AsposeBookException(e);
        }
    }

So. I expect, that values of range J1:J17 will be copied to All cells K1:AK17 (horizontally copying). But result is very strange.

Also. There is two almost equally files. For test.xlsx code works correctly, but for test1.xlsx - code returns wrong file

There is source test.zip (42.8 KB)

Best regards. Alexey

@makarovalv,

Please notice, I am able to reproduce the issue as you mentioned. I found the issue when copying ranges, the issue is with horizontal copying of ranges in the output XLSX. I have logged a ticket with an id “CELLSJAVA-44344” for your issue. We will look into it soon.

Once we have an update on it, we will let you know.

@makarovalv,

This is to inform you that we have fixed your issue now. The fix will be included in the next regular release, Aspose.Cells for Java v22.3 which is scheduled to be published in the first half of March, 2022. You will also be notified once the release is published.

The issues you have found earlier (filed as CELLSJAVA-44344) have been fixed in this update. This message was posted using Bugs notification tool by Peyton.Xu