Hello
I am very new to Java and to Aspose and messing around a bit with our code in order to trying to figure out if updating to Apose 19 will improve the performance. I replaced the libary of aspose 7.7.1.3 with the latest 19.9, but when I try to run it gets stuck on this:
@Override
public Collection<CellRangeAddress> getRegions() {
Collection<CellRangeAddress> ret = new ArrayList<CellRangeAddress>();
ArrayList<CellArea> areaList = validation.getAreaList();
for (CellArea cellArea : areaList) {
ret.add(new AsposeCellRangeAddress(cellArea));
}
return ret;
}
the getAreaList method is not in the validation class anymore in Aspose 19. In another thread I read that getAreas can be used, but the types of data passed are very different. First a list was passed and now with the getAreas method a CellArray[] is passed. Can you please tell me what to write on the line that starts with ArrayList? I tried several thing but cannot get it to work.
Some additional code, might it be needed:
the above code is in an AsposeDataValidation class that extends the DataValidation class:
public abstract class DataValidation {
public abstract int getValidationConstraintType();
public abstract Collection<CellRangeAddress> getRegions();
public abstract List<Object> getValidationOptionValues(String type, Sheet sheet,
IProvideCellValue valueProvider) throws Exception;
}
The CellRangeAddress class is also self written, here is the code of that one:
public abstract class CellRangeAddress {
public abstract Integer getFirstRow();
public abstract Integer getFirstColumn();
public abstract Integer getLastRow();
}
Hopefully this provides you enough information of how to update my code.