Package io.keikai.api
Class Ranges
- java.lang.Object
-
- io.keikai.api.Ranges
-
-
Constructor Summary
Constructors Constructor Description Ranges()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetAreaRefString(int tRow, int lCol, int bRow, int rCol)Gets area reference expressionstatic StringgetAreaRefString(Sheet sheet, int tRow, int lCol, int bRow, int rCol)Gets area reference expressionstatic StringgetAreaRefString(Sheet sheet, AreaRef area)Gets area reference expressionstatic StringgetCellRefString(int row, int col)Gets cell reference expressionstatic StringgetCellRefString(Sheet sheet, int row, int col)Gets cell reference expression stringstatic StringgetColumnRefString(int column)Get column reference stringstatic List<String>getNames(Sheet sheet)Returns a list of the defined names belong to the specifiedSheet;static StringgetRowRefString(int row)Get row referencestatic Rangerange(Book book)static Rangerange(Sheet sheet)static Rangerange(Sheet sheet, int row, int col)static Rangerange(Sheet sheet, int tRow, int lCol, int bRow, int rCol)Returns the associatedXRangeof the specifiedXSheetand area.static Rangerange(Sheet sheet, AreaRef selection)static Rangerange(Sheet sheet, String areaReference)static RangerangeByName(Sheet sheet, String name)Returns the associatedRangeof the specified name of a NamedRange (e.g.
-
-
-
Method Detail
-
rangeByName
public static Range rangeByName(Sheet sheet, String name)
Returns the associatedRangeof the specified name of a NamedRange (e.g. "MyRange");
-
getNames
public static List<String> getNames(Sheet sheet)
Returns a list of the defined names belong to the specifiedSheet;- Parameters:
sheet- theSheetthe defined names will refer to.- Returns:
- a list of the defined names of the specified sheet
- Since:
- 5.1.0
-
range
public static Range range(Sheet sheet, int tRow, int lCol, int bRow, int rCol)
Returns the associatedXRangeof the specifiedXSheetand area.- Parameters:
sheet- theSheetthe Range will refer to.tRow- top row index of the area the Range will refer to.lCol- left column index of the area the Range will refer to.bRow- bottom row index of the area the Range will refer to.rCol- right column index fo the area the Range will refer to.- Returns:
- the associated
Rangeof the specifiedSheetand area.
-
range
public static Range range(Sheet sheet, AreaRef selection)
- Parameters:
sheet- theSheetthe Range will refer to.selection- the selection of spreadsheet
-
getCellRefString
public static String getCellRefString(int row, int col)
Gets cell reference expression- Parameters:
row- 0-based row indexcol- 0-based column index- Returns:
- the cell reference string (e.g. A1)
-
getCellRefString
public static String getCellRefString(Sheet sheet, int row, int col)
Gets cell reference expression string- Parameters:
sheet- sheetrow- 0-based row indexcol- 0-based column index- Returns:
- the cell reference string (e.g. Sheet1!A1)
-
getAreaRefString
public static String getAreaRefString(int tRow, int lCol, int bRow, int rCol)
Gets area reference expression- Parameters:
tRow- top rowlCol- left columnbRow- bottom/last rowrCol- right/last column- Returns:
- the area reference string (e.g. A1:B2)
-
getAreaRefString
public static String getAreaRefString(Sheet sheet, int tRow, int lCol, int bRow, int rCol)
Gets area reference expression- Parameters:
sheet- sheettRow- top rowlCol- left columnbRow- bottom rowrCol- right column- Returns:
- the area reference string (e.g. Sheet1!A1:B2)
-
getAreaRefString
public static String getAreaRefString(Sheet sheet, AreaRef area)
Gets area reference expression- Parameters:
sheet- sheetarea- area- Returns:
- the area reference string (e.g. Sheet1!A1:B2)
-
getColumnRefString
public static String getColumnRefString(int column)
Get column reference string- Parameters:
column- 0-based column index- Returns:
- the column reference string (e.g A, AB)
-
getRowRefString
public static String getRowRefString(int row)
Get row reference- Parameters:
row- 0-based row index- Returns:
- the column reference string (e.g 1, 12)
-
-