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 String
getAreaRefString(int tRow, int lCol, int bRow, int rCol)
Gets area reference expressionstatic String
getAreaRefString(Sheet sheet, int tRow, int lCol, int bRow, int rCol)
Gets area reference expressionstatic String
getAreaRefString(Sheet sheet, AreaRef area)
Gets area reference expressionstatic String
getCellRefString(int row, int col)
Gets cell reference expressionstatic String
getCellRefString(Sheet sheet, int row, int col)
Gets cell reference expression stringstatic String
getColumnRefString(int column)
Get column reference stringstatic List<String>
getNames(Sheet sheet)
Returns a list of the defined names belong to the specifiedSheet
;static String
getRowRefString(int row)
Get row referencestatic Range
range(Book book)
static Range
range(Sheet sheet)
static Range
range(Sheet sheet, int row, int col)
static Range
range(Sheet sheet, int tRow, int lCol, int bRow, int rCol)
Returns the associatedXRange
of the specifiedXSheet
and area.static Range
range(Sheet sheet, AreaRef selection)
static Range
range(Sheet sheet, String areaReference)
static Range
rangeByName(Sheet sheet, String name)
Returns the associatedRange
of the specified name of a NamedRange (e.g.
-
-
-
Method Detail
-
rangeByName
public static Range rangeByName(Sheet sheet, String name)
Returns the associatedRange
of 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
- theSheet
the 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 associatedXRange
of the specifiedXSheet
and area.- Parameters:
sheet
- theSheet
the 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
Range
of the specifiedSheet
and area.
-
range
public static Range range(Sheet sheet, AreaRef selection)
- Parameters:
sheet
- theSheet
the 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)
-
-