@Test void testToValueFormulaNumericLong() throws Exception { CellValue cellValue = new CellValue(1.2342151234E10); Cell cell = mock(Cell.class); FormulaEvaluator formulaEvaluator = mock(FormulaEvaluator.class); when(formulaEvaluator.evaluate(cell)).thenReturn(cellValue); CreationHelper creationHelper = mock(CreationHelper.class); when(creationHelper.createFormulaEvaluator()).thenReturn(formulaEvaluator); Workbook workbook = mock(Workbook.class); when(workbook.getCreationHelper()).thenReturn(creationHelper); Sheet sheet = mock(Sheet.class); when(sheet.getWorkbook()).thenReturn(workbook); when(cell.getCellTypeEnum()).thenReturn(FORMULA); when(cell.getSheet()).thenReturn(sheet); when(cell.getNumericCellValue()).thenReturn(1.2342151234E10); assertEquals("12342151234", toValue(cell)); }
static String toValue(Cell cell) { return toValue(cell, null); }
ExcelUtils { static String toValue(Cell cell) { return toValue(cell, null); } }
ExcelUtils { static String toValue(Cell cell) { return toValue(cell, null); } private  ExcelUtils(); }
ExcelUtils { static String toValue(Cell cell) { return toValue(cell, null); } private  ExcelUtils(); static void renameSheet(String newSheetname, File file, int index); static int getNumberOfSheets(File file); static boolean isExcelFile(String filename); }
ExcelUtils { static String toValue(Cell cell) { return toValue(cell, null); } private  ExcelUtils(); static void renameSheet(String newSheetname, File file, int index); static int getNumberOfSheets(File file); static boolean isExcelFile(String filename);  }