Код: Выделить всё
FileInputStream file = null;
Workbook workbook = null;
try {
file = new FileInputStream(System.getProperty("user.home") + "/Downloads/" + fileName);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
if (fileName.endsWith(".xls")) {
try {
**workbook = new HSSFWorkbook(file);**
} catch (IOException e) {
e.printStackTrace();
}
Я импортировал в pom.xml:
Код: Выделить всё
org.apache.poi
poi
5.2.0
org.apache.poi
poi-ooxml
5.2.0
Вызвано: java.lang.ClassNotFoundException: org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream
Буду признателен за помощь.
Спасибо.
Подробнее здесь: https://stackoverflow.com/questions/715 ... ronizedbyt