Hi,
I think you may try to use CellsHelper static class methods (the class has some useful methods) which Aspose.Cells for Java provides for your needs. You may get your desired data or information, see the sample code below with comments, you may refer to it and write your own codes accordingly.
e.g
Sample code:
Workbook wb = new Workbook();
//…
//Range String
String val = “Sheet1!$A$1:$C$10”;
//Get the first split
String [] strSplitData1 = val.split("!");
//Get the worksheet name from first array
System.out.println(“Sheet Name: " +strSplitData1[0]);
//Performing operations on the second array, replace the “$” first.
String strCellRange = strSplitData1[1].replace(”$", “”);
//Splitting by “:” - we will get two arrays.
String [] strCellRanges = strCellRange.split(":");
//Get the first row and first column from the first array.
int [] frowcol = CellsHelper.cellNameToIndex(strCellRanges[0]);
//Get the last row and last column indices from second array
int []lrowcol = CellsHelper.cellNameToIndex(strCellRanges[1]);
//Print the first array
System.out.println("First Row: " + frowcol[0]);
System.out.println("First Col: " + frowcol[1]);
//Print the second(last) array.
System.out.println("End Row: " + lrowcol[0]);
System.out.println("End Col: " + lrowcol[1]);
Hope, this helps you a bit.
Thank you.