setSkipBlanks(true) does not skip blank source cells when pasting

Using the setSkipBlanks paste option does not work with Aspose Cells 24.7. Below is sample Java code and a ZIP containing the input and output Excel files that demonstrate this issue:

public static void main(String[] args) throws Exception {
    Workbook workbook = new Workbook("./input.xlsx");
    Worksheet targetSheet = workbook.getWorksheets().get(0);
    Worksheet sourceSheet = workbook.getWorksheets().get(1);

    Range targetRange = targetSheet.getCells().createRange(0, 0, 2, 2);
    Range sourceRange = sourceSheet.getCells().createRange(0, 0, 2, 2);

    PasteOptions options = new PasteOptions();
    options.setSkipBlanks(true);
    targetRange.copy(sourceRange, options);
    workbook.save("./output.xlsx");
}

excel-files.zip (14.3 KB)

In the 2x2 source range, there are two blank cells, which should be skipped, thus leaving the two corresponding cells in the 2x2 target range unchanged. Aspose Cells does not behave the same way as Excel (Version 2405 Build 16.0.17628.20006).

Source range:

Target range before copy-paste:

Target range after pasting with Aspose (skip blanks true not working):

Target range after pasting with Excel (skip blanks true):

Excel special paste options used:

@jesparaz
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSJAVA-46056

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@jesparaz,

We are pleased to inform you that your issue (Ticket ID: “CELLSJAVA-46056”) has been resolved. The fix will be included in the upcoming release (Aspose.Cells v24.8) which we plan to release in the first half of August 2024. We will notify you when the next release is released.

1 Like

The issues you have found earlier (filed as CELLSJAVA-46056) have been fixed in Aspose.Cells for Java 24.8.