java.lang.Object
com.vaadin.flow.component.spreadsheet.charts.converter.Utils

public class Utils extends Object
  • Constructor Details

    • Utils

      public Utils()
  • Method Details

    • callMethodUsingReflection

      public static <T> T callMethodUsingReflection(Object o, String name)
    • getEnumValueOrDefault

      public static <E extends Enum> E getEnumValueOrDefault(Class<? extends E> eClass, String value, E defaultValue)
    • getStringValueFromFormula

      public static String getStringValueFromFormula(String formula, Spreadsheet spreadsheet)
    • join

      public static String join(List<String> array, String separator)
    • getAllReferencedCells

      public static List<org.apache.poi.ss.util.CellReference> getAllReferencedCells(org.apache.poi.ss.SpreadsheetVersion version, String formula)
      Returns all cells in the referenced areas.
      Parameters:
      version - for inferring ranges for column-only references
      formula -
      Returns:
      all cells in the referenced areas
    • getAreaReferences

      public static org.apache.poi.ss.util.AreaReference[] getAreaReferences(org.apache.poi.ss.SpreadsheetVersion version, String formula)
      Returns an array of contiguous area references addressed by the given formula.
      Parameters:
      version - to infer max # of rows for column-only formula references
      formula - containing possibly non-contiguous area refrences
      Returns:
      array of references
    • getAllReferencedVisibleCells

      public static List<org.apache.poi.ss.util.CellReference> getAllReferencedVisibleCells(String formula, Spreadsheet spreadsheet)
      This function uses the getAllReferencedCells function but filters out all the hidden rows from the list honoring filtering of charts based on spreadsheettable filter settings
    • getAllReferencedCells

      public static List<org.apache.poi.ss.util.CellReference> getAllReferencedCells(String formula, Spreadsheet spreadsheet, boolean includeHiddenCells)
      This function returns all the cells that the given formula references. You can optionally filter out all the hidden rows from the list honoring filtering of charts based on spreadsheettable filter settings.
      Parameters:
      formula - The formula to find referenced cells for
      spreadsheet - Spreadsheet to operate on
      includeHiddenCells - true to include cells residing on hidden rows or columns, false to omit them
    • getStringValue

      public static String getStringValue(org.apache.poi.ss.util.CellReference ref, Spreadsheet spreadsheet)
    • getNumericValue

      public static Double getNumericValue(org.apache.poi.ss.util.CellReference ref, Spreadsheet spreadsheet)