We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Call find throws NullPointerException

Hello. I have the same issue, but with another book (8.3.1.1)


Below test, that thorws exception

public void findNP() throws Exception {
Workbook book = new Workbook(“D:\37_Tabela 4 sata - nova_333.xlsx”);
Worksheet sheet = book.getWorksheets().get(0);
Cells cells = sheet.getCells();

PasteOptions options = new PasteOptions();
options.setPasteType(PasteType.ALL);

// First block, ok
cells.insertRange(CellArea.createCellArea(28, 1, 33, 12), ShiftType.DOWN);

book.save(“D://1.xlsx”);

Range source = createRange(cells, 25, 1, 27, 12);
Range range = createRange(cells, 28, 1, 33, 12);
range.copy(source, options);

book.save(“D://2.xlsx”);

find(cells, 25, 1, 27, 12);
find(cells, 28, 1, 30, 12);
find(cells, 31, 1, 33, 12);

cells.insertRange(CellArea.createCellArea(41, 1, 46, 12), ShiftType.DOWN);

book.save(“D://3.xlsx”);

source = createRange(cells, 38, 1, 40, 12);
range = createRange(cells, 41, 1, 46, 12);
range.copy(source, options);

book.save(“D://4.xlsx”);

find(cells, 38, 1, 40, 12);
find(cells, 41, 1, 43, 12);
find(cells, 44, 1, 46, 12);

book.save(“d:\bug.xlsx”);
}

private Range createRange(Cells cells, int row, int col, int row1, int col1) {
return cells.createRange(row, col, row1 - row + 1, col1 - col + 1);
}

private void find(Cells cells, int row, int col, int row1, int col1) {
FindOptions opt = new FindOptions();
opt.setRange(CellArea.createCellArea(row, col, row1, col1));
opt.setLookAtType(LookAtType.CONTAINS);
opt.setCaseSensitive(false);
opt.setSearchNext(true);
opt.setLookInType(LookInType.FORMULAS);
cells.find(“USBANDCOUNT”, null, opt);
}

Hi Alexey,


Thank you for contacting Aspose support.

We have evaluated your presented scenario while using the Aspose.Cells for Java 8.3.1.2 and we are able to observe the java.lang.NullPointerException caused by the Cells,find method. We have logged the problem in our bug tracking system under the ticket CELLSJAVA-41164 for further investigation. Please spare us little time to properly analyze the problem cause. In the meanwhile, we will keep you posted with updates in this regard.

Please note, we have split the existing thread to create a new one on your behalf in order to treat your presented scenario as a distinct incident. Moreover, now you are the owner of the thread, you will be able to receive the automated notifications regarding the aforesaid ticket.

Hi Alexey,


This is to inform you that we have fixed the problem logged earlier as CELLSJAVA-41164. The fix will be published with the upcoming release of Aspose.Cells for Java API after incorporating other enhancements and performing QA over it. Once the next release is available for public use, we will notify you here along with the download link to the upgraded API.

Thank you for your patience with us.

Hi. Could you send to me some private jar of library, because this exception’s fix very urgent for us.


Best regards. Alexey

Hi,


You will get the interim fix shortly here

Keep in touch.

Thank you.

Hi,


Please try our latest version/fix: Aspose.Cells for Java v8.3.1.5 (attached).

We have fixed your issue now.

Let us now your feedback.

Thank you.

Hi,


Please ignore my previous post and the attached fix v8.3.1.5. This fix does not correct your issue but includes other fixes and enhancements. We will provide a fix in 1-2 days hopefully that will figure out your issue fully.

You will be notified here once the fix is released.

Sorry for any inconvenience caused!

Hi,

Please try our latest version/ fix: Aspose.Cells for Java (Latest Version)


We have fixed your issue now.

Let us know your feedback.

Thank you.

The issues you have found earlier (filed as CELLSJAVA-41164) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.