'Apache POI on Ubuntu Focal Fossa 20.04

I am trying to applied Apache POI on my Linux system, using IntelliJ. I have downloaded jar files from Apache POI site, for windows (I couldn't find any for Linux, there are options for Mac and Windows only) and I wrote a code to retrieve data from *.xlsx spreadsheet:

String path = "/home/razz/Documents/test01.xlsx";
FileInputStream fileInputStream = new FileInputStream(path);
XSSFWorkbook xssfWorkbook = new XSSFWorkbook(fileInputStream); // musimy add exception
Sheet sheet = xssfWorkbook.getSheet("Sheet1");

Row row = sheet.getRow(0);
System.out.println(row);

But I am receiving an error

ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
<xml-fragment r="1" customFormat="false" ht="12.8" hidden="false" customHeight="false" outlineLevel="0" collapsed="false" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:xdr="http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:main="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
  <main:c r="A1" s="0" t="s">
    <main:v>0</main:v>
  </main:c>
  <main:c r="B1" s="0" t="s">
    <main:v>1</main:v>
  </main:c>
</xml-fragment>

Process finished with exit code 0

I cannot find any tutorial how to make it work.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source