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 java.lang.StringgetAreaRefString(int tRow, int lCol, int bRow, int rCol)Gets area reference expressionstatic java.lang.StringgetAreaRefString(Sheet sheet, int tRow, int lCol, int bRow, int rCol)Gets area reference expressionstatic java.lang.StringgetAreaRefString(Sheet sheet, AreaRef area)Gets area reference expressionstatic java.lang.StringgetCellRefString(int row, int col)Gets cell reference expressionstatic java.lang.StringgetCellRefString(Sheet sheet, int row, int col)Gets cell reference expression stringstatic java.lang.StringgetColumnRefString(int column)Get column reference stringstatic java.util.List<java.lang.String>getNames(Sheet sheet)Returns a list of the defined names belong to the specifiedSheet;static java.lang.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, CellRegion cellRegion)static Rangerange(Sheet sheet, java.lang.String areaReference)static RangerangeByName(Sheet sheet, java.lang.String name)Returns the associatedRangeof the specified name of a NamedRange (e.g.
-
-
-
Method Detail
-
rangeByName
public static Range rangeByName(Sheet sheet, java.lang.String name)
Returns the associatedRangeof the specified name of a NamedRange (e.g. "MyRange");
-
getNames
public static java.util.List<java.lang.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
-
range
public static Range range(Sheet sheet, CellRegion cellRegion)
- Parameters:
sheet- theSheetthe Range will refer to.cellRegion- the cell region- Since:
- 6.2.0
-
getCellRefString
public static java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.String getRowRefString(int row)
Get row reference- Parameters:
row- 0-based row index- Returns:
- the column reference string (e.g 1, 12)
-
-