Class ExcelEvaluator
java.lang.Object
org.qubership.atp.dataset.migration.model.ExcelEvaluator
-
Constructor Summary
ConstructorsConstructorDescriptionExcelEvaluator(List<Path> refFiles, ExcelFormulasEvaluator formulaEvaluator) -
Method Summary
Modifier and TypeMethodDescriptiongetFormulaValue(ParameterAssociation parameter, List<org.apache.poi.poifs.filesystem.Ole10Native> files) Calculate formula value.org.apache.poi.ss.usermodel.WorkbookgetParentBook(org.apache.poi.xssf.usermodel.XSSFWorkbook childBook) getValue(org.apache.poi.ss.usermodel.Cell cell) get string value of cell.org.apache.poi.xssf.usermodel.XSSFWorkbookregister file can be used in external formulas evaluation.voidregister all referenced files.voidrelease()release excel resources.
-
Constructor Details
-
ExcelEvaluator
-
-
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 readorg.apache.poi.openxml4j.exceptions.InvalidFormatException- if excel file has more than one reference to external files
-
getValue
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.InvalidFormatExceptionregister all referenced files.- Throws:
IOException- file can not be readorg.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)
-