getCells.findString to search regex

Hi,

Yes indeed. Even if you specify range in FindOptions, it searches outside that range too. in short the whole sheet is searched even with provided range. Do let me know here when that findString method works fine. Thanks!

Regards,

Rohan Naik

Hi,

Thanks for your posting.

I have logged your comment in our database against the issue id: CELLSJAVA-40178

We will let you know once we will have some update for you.

Hi,


We have fixed this issue. Please download and try this latest fix of Aspose.Cells for Java V 7.2.0.7.

Thanks

Hi, I tested it with the latest jar. But it doesn't seem to work. Please find the below code and attached file.

public static void main(String[] args) {

String filepathA = "C://FileA.xls";

String test7 = "*Close of*";

try{

LoadOptions loadOptions1 = new LoadOptions(FileFormatType.EXCEL_97_TO_2003);

Workbook workbook1 = new Workbook(filepathA,loadOptions1);

FindOptions opt = new FindOptions();

opt.setRange(CellArea.createCellArea("A8", "F8"));

Cell c = workbook1.getWorksheets().get(0).getCells().findString(test7,null, opt);

}catch(Exception e){

e.printStackTrace();

}

}

Hi,


Thanks for evaluating it.

I have found the issue, I found the following exception by running your code with your template file:
Exception in thread “main” java.lang.NullPointerException

I have logged it and we will soon look into it.

Thank you.

Hi,

Please use the following code for searching regex in range:

Java


FindOptions opt = new FindOptions();

opt.setRange(CellArea.createCellArea(“A8”, “F8”));

opt.setLookAtType(LookAtType.ENTIRE_CONTENT);

Cell c = workbook1.getWorksheets().get(0).getCells().find(test7, null, opt);


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


This message was posted using Notification2Forum from Downloads module by aspose.notifier.