Class ExcelEvaluator

java.lang.Object
org.qubership.atp.dataset.migration.model.ExcelEvaluator

public class ExcelEvaluator extends Object
  • Constructor Details

  • Method Details

    • register

      public org.apache.poi.xssf.usermodel.XSSFWorkbook register(Path file) throws IOException, org.apache.poi.openxml4j.exceptions.InvalidFormatException
      register file can be used in external formulas evaluation.
      Parameters:
      file - excel file to be registered
      Returns:
      excel workbook
      Throws:
      IOException - file can not be read
      org.apache.poi.openxml4j.exceptions.InvalidFormatException - if excel file has more than one reference to external files
    • getValue

      @Nonnull public String getValue(org.apache.poi.ss.usermodel.Cell cell)
      get string value of cell.
      Parameters:
      cell - to be calculated
      Returns:
      calculated value
    • getFormulaValue

      public Formula getFormulaValue(ParameterAssociation parameter, List<org.apache.poi.poifs.filesystem.Ole10Native> files)
      Calculate formula value.
      Parameters:
      parameter - to be calculated
      Returns:
      calculated formula
    • registerAll

      public void registerAll() throws IOException, org.apache.poi.openxml4j.exceptions.InvalidFormatException
      register all referenced files.
      Throws:
      IOException - file can not be read
      org.apache.poi.openxml4j.exceptions.InvalidFormatException - if excel file has more than one reference to external files
    • release

      public void release()
      release excel resources.
    • getParentBook

      public org.apache.poi.ss.usermodel.Workbook getParentBook(org.apache.poi.xssf.usermodel.XSSFWorkbook childBook)