Package ch.rabanti.nanoxlsx4j
Class BasicFormulas
java.lang.Object
ch.rabanti.nanoxlsx4j.BasicFormulas
Class for handling of basic Excel formulas
- Author:
- Raphael Stoeckli
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CellReturns a cell with an average formulastatic CellReturns a cell with an average formulastatic CellReturns a cell with a ceil formulastatic CellReturns a cell with a ceil formulastatic CellReturns a cell with a floor formulastatic CellReturns a cell with a floor formulastatic CellReturns a cell with a max formulastatic CellReturns a cell with a max formulastatic CellReturns a cell with a median formulastatic CellReturns a cell with a median formulastatic CellReturns a cell with a min formulastatic CellReturns a cell with a min formulastatic CellReturns a cell with a round formulastatic CellReturns a cell with a round formulastatic CellReturns a cell with a sum formulastatic CellReturns a cell with a sum formulastatic CellFunction to generate a Vlookup as Excel functionstatic CellVLookup(Worksheet queryTarget, Address address, Worksheet rangeTarget, Range range, int columnIndex, boolean exactMatch) Function to generate a Vlookup as Excel functionstatic CellFunction to generate a Vlookup as Excel functionstatic CellFunction to generate a Vlookup as Excel function
-
Constructor Details
-
BasicFormulas
public BasicFormulas()
-
-
Method Details
-
Average
Returns a cell with an average formula- Parameters:
range- Cell range to apply the average operation to- Returns:
- Prepared Cell Object, ready to be added to a worksheet
-
Average
Returns a cell with an average formula- Parameters:
target- Target worksheet of the average operation. Can be null if on the same worksheetrange- Cell range to apply the average operation to- Returns:
- Prepared Cell Object, ready to be added to a worksheet
-
Ceil
Returns a cell with a ceil formula- Parameters:
address- Address to apply the ceil operation todecimals- Number of decimals (digits)- Returns:
- Prepared Cell Object, ready to be added to a worksheet
-
Ceil
Returns a cell with a ceil formula- Parameters:
target- Target worksheet of the ceil operation. Can be null if on the same worksheetaddress- Address to apply the ceil operation todecimals- Number of decimals (digits)- Returns:
- Prepared Cell Object, ready to be added to a worksheet
-
Floor
Returns a cell with a floor formula- Parameters:
address- Address to apply the floor operation todecimals- Number of decimals (digits)- Returns:
- Prepared Cell Object, ready to be added to a worksheet
-
Floor
Returns a cell with a floor formula- Parameters:
target- Target worksheet of the floor operation. Can be null if on the same worksheetaddress- Address to apply the floor operation todecimals- Number of decimals (digits)- Returns:
- Prepared Cell Object, ready to be added to a worksheet
-
Max
Returns a cell with a max formula- Parameters:
range- Cell range to apply the max operation to- Returns:
- Prepared Cell Object, ready to be added to a worksheet
-
Max
Returns a cell with a max formula- Parameters:
target- Target worksheet of the max operation. Can be null if on the same worksheetrange- Cell range to apply the max operation to- Returns:
- Prepared Cell Object, ready to be added to a worksheet
-
Median
Returns a cell with a median formula- Parameters:
range- Cell range to apply the median operation to- Returns:
- Prepared Cell Object, ready to be added to a worksheet
-
Median
Returns a cell with a median formula- Parameters:
target- Target worksheet of the median operation. Can be null if on the same worksheetrange- Cell range to apply the median operation to- Returns:
- Prepared Cell Object, ready to be added to a worksheet
-
Min
Returns a cell with a min formula- Parameters:
range- Cell range to apply the min operation to- Returns:
- Prepared Cell Object, ready to be added to a worksheet
-
Min
Returns a cell with a min formula- Parameters:
target- Target worksheet of the min operation. Can be null if on the same worksheetrange- Cell range to apply the median operation to- Returns:
- Prepared Cell Object, ready to be added to a worksheet
-
Round
Returns a cell with a round formula- Parameters:
address- Address to apply the round operation todecimals- Number of decimals (digits)- Returns:
- Prepared Cell Object, ready to be added to a worksheet
-
Round
Returns a cell with a round formula- Parameters:
target- Target worksheet of the round operation. Can be null if on the same worksheetaddress- Address to apply the round operation todecimals- Number of decimals (digits)- Returns:
- Prepared Cell Object, ready to be added to a worksheet
-
Sum
Returns a cell with a sum formula- Parameters:
range- Cell range to get a sum of- Returns:
- Prepared Cell Object, ready to be added to a worksheet
-
Sum
Returns a cell with a sum formula- Parameters:
target- Target worksheet of the sum operation. Can be null if on the same worksheetrange- Cell range to get a sum of- Returns:
- Prepared Cell Object, ready to be added to a worksheet
-
VLookup
Function to generate a Vlookup as Excel function- Parameters:
number- Numeric value for the lookup. Valid types are int, long, float and doublerange- Matrix of the lookupcolumnIndex- Column index of the target column within the range (1 based)exactMatch- If true, an exact match is applied to the lookup- Returns:
- Prepared Cell Object, ready to be added to a worksheet
- Throws:
RangeException- is thrown if the value or column index is invalid
-
VLookup
public static Cell VLookup(Object number, Worksheet rangeTarget, Range range, int columnIndex, boolean exactMatch) Function to generate a Vlookup as Excel function- Parameters:
number- Numeric value for the lookup. Valid types are int, long, float and doublerangeTarget- Target worksheet of the matrix. Can be null if on the same worksheetrange- Matrix of the lookupcolumnIndex- Column index of the target column within the range (1 based)exactMatch- If true, an exact match is applied to the lookup- Returns:
- Prepared Cell Object, ready to be added to a worksheet
- Throws:
RangeException- is thrown if the value or column index is invalid
-
VLookup
Function to generate a Vlookup as Excel function- Parameters:
address- Query address of a cell as string as source of the lookuprange- Matrix of the lookupcolumnIndex- Column index of the target column within the range (1 based)exactMatch- If true, an exact match is applied to the lookup- Returns:
- Prepared Cell Object, ready to be added to a worksheet
- Throws:
RangeException- is thrown if the column index is invalid
-
VLookup
public static Cell VLookup(Worksheet queryTarget, Address address, Worksheet rangeTarget, Range range, int columnIndex, boolean exactMatch) Function to generate a Vlookup as Excel function- Parameters:
queryTarget- Target worksheet of the query argument. Can be null if on the same worksheetaddress- Query address of a cell as string as source of the lookuprangeTarget- Target worksheet of the matrix. Can be null if on the same worksheetrange- Matrix of the lookupcolumnIndex- Column index of the target column within the range (1 based)exactMatch- If true, an exact match is applied to the lookup- Returns:
- Prepared Cell Object, ready to be added to a worksheet
- Throws:
RangeException- is thrown if the column index is invalid
-