APACHE POI / CATATAN</>↗Apache POI24 Mar 2009
In this example we try to obtain the Excel’s cell data type so that we can read the value using the right method. The data to be read is in a file named celltype.xls. The matrix below depict how the file is. | COL ROW | 0 1 2 3 4 —-|————————- 0 | 1 […]
APACHE POI / CATATAN</>↗Apache POI20 Mar 2009
In this example we demonstrate how to read data from an Excel file. In this example we limit to read a string data only. After reading the data, iterating each row and cells of the Excel file we display the content to the program console. package org.kodejava.poi; import org.apache.poi.hssf.usermodel.HSSFCell; import org.apache.poi.hssf.usermodel.HSSFRow; import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFWorkbook; […]
APACHE POI / CATATAN</>↗Apache POI15 Des 2008
This example demonstrate how to use HSSFCellStyle and HSSFFont to format the cell style in Excel document. Using this class we can define cell border, foreground and background color. We can also define the font we used to display the cell value. package org.kodejava.poi; import org.apache.poi.hssf.usermodel.*; import org.apache.poi.hssf.util.HSSFColor; import org.apache.poi.ss.usermodel.BorderStyle; import org.apache.poi.ss.usermodel.FillPatternType; import java.io.FileOutpu...
APACHE POI / CATATAN</>↗Apache POI15 Des 2008
This example demonstrate how to create an Excel document using Apache POI library. In this example we create a simple document containing two sheets which have a value on their first cell. package org.kodejava.poi; import org.apache.poi.hssf.usermodel.*; import java.io.FileOutputStream; import java.io.IOException; public class CreateExcelDemo { public static void main(String[] args) { // Creating an instance of […]