@Test public void no_detect_excel() throws Exception { InputStream inputStream = getClass().getResourceAsStream("fake.xls"); Assertions.assertThat(XlsUtils.isNewExcelFormat(inputStream)).isFalse(); inputStream = getClass().getResourceAsStream("fake.xls"); Assertions.assertThat(XlsUtils.isNewExcelFormat(inputStream)).isFalse(); }
public static boolean isNewExcelFormat(InputStream inputStream) throws IOException { return FileMagic.valueOf(inputStream) == FileMagic.OOXML; }
XlsUtils { public static boolean isNewExcelFormat(InputStream inputStream) throws IOException { return FileMagic.valueOf(inputStream) == FileMagic.OOXML; } }
XlsUtils { public static boolean isNewExcelFormat(InputStream inputStream) throws IOException { return FileMagic.valueOf(inputStream) == FileMagic.OOXML; } private  XlsUtils(); }
XlsUtils { public static boolean isNewExcelFormat(InputStream inputStream) throws IOException { return FileMagic.valueOf(inputStream) == FileMagic.OOXML; } private  XlsUtils(); static String getCellValueAsString(Cell cell, FormulaEvaluator formulaEvaluator); static boolean isNewExcelFormat(InputStream inputStream); static List<String> getActiveSheetsFromWorkbookSpec(InputStream inputStream); static int getColumnsNumber(InputStream inputStream); static int getColumnsNumberFromDimension(String dimension); static int getColumnNumberFromCellRef(String lastCell); }
XlsUtils { public static boolean isNewExcelFormat(InputStream inputStream) throws IOException { return FileMagic.valueOf(inputStream) == FileMagic.OOXML; } private  XlsUtils(); static String getCellValueAsString(Cell cell, FormulaEvaluator formulaEvaluator); static boolean isNewExcelFormat(InputStream inputStream); static List<String> getActiveSheetsFromWorkbookSpec(InputStream inputStream); static int getColumnsNumber(InputStream inputStream); static int getColumnsNumberFromDimension(String dimension); static int getColumnNumberFromCellRef(String lastCell);  }