APACHE POI / CATATAN</>↗Apache POI09 Des 2023
Apache POI is a robust open-source library that provides APIs for manipulating various file formats based upon the Office Open XML standards (OOXML) and Microsoft’s OLE2 compound document format (OLE2). Being Java-based, it’s readily used by Java developers for creating, reading, and modifying Excel files. To create a new Excel file using Apache POI, you […]
APACHE POI / CATATAN</>↗Apache POI08 Des 2023
First of all, make sure that you have the Apache POI library included in your project. If you are using Maven, you can add the following to your pom.xml: Maven Dependencies <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> <version>5.2.5</version> </dependency> Then, you can use the following code to create an Excel .xlsx file: package org.kodejava.poi; import org.apache.poi.ss.usermodel.*; import org.apache.poi.xssf.usermodel.XSSFWorkbook; […]
APACHE POI / CATATAN</>↗Apache POI15 Apr 2023
A friend of mine told me that he has a large Excel file, and he asked me if I could split the file into multiple smaller Excel files. So I write this little program using Apache POI to do it. The code snippet below basically contains the following steps: Load the Excel as an InputStream […]
APACHE POI / CATATAN</>↗Apache POI05 Feb 2016
When I was creating the code snippet for the How do I replace text in Microsoft Word document using Apache POI? I got the following error when running the snippet . As additional information, the code snippet for the Kodejava website is written as a Maven project. org.apache.poi.poifs.filesystem.NotOLE2FileException: Invalid header signature; read 0xE011BDBFEFBDBFEF, expected 0xE11AB1A1E011CFD0 […]
APACHE POI / CATATAN</>↗Apache POI05 Feb 2016
The code snippet below show you how you can replace string in Microsoft Word document using the Apache POI library. The class below have three method, the openDocument(), saveDocument() and replaceText(). The routine for replacing text is implemented in the replaceText() method. This method take the HWPFDocument, the String to find and the String to […]
APACHE POI / CATATAN</>↗Apache POI25 Mar 2009
The code below check if the first cell of an Excel file contains a date value. In Excel the cell type for date is returned as HSSFCell.CELL_TYPE_NUMERIC, to make sure if it contains a date we can use a utility method DateUtil.isCellDateFormatted(Cell cell), this method will check if the cell value is a valid date. […]