Apache POI Excel Document HandlingTo handle the Excel (.xls) document, Apache POI provides complete API which consists of classes and methods which can be used to create excel, read and write data. The HSSF is a pure Java implementation of excel file format. While working with excel file, first we need to create workbook by using HSSFWorkbook class. After that to create row and cell in the sheet, API provides separate classes for each one. To create row, org.apache.poi.ss.usermodel.Row class and for cell org.apache.poi.ss.usermodel.Cell class is provided. Apache POI WorkbookIt is an interface which is used to create an Excel workbook. It holds object of HSSFWorkbook class and provides methods to create, read and write into the Excel sheet. Apache POI Workbook commonly used Methods
Workbook represents an Excel file which is created using HSSF Workbook class. Lets see a simple example where we create a workbook. Apache POI Workbook ExampleOutput: It will create an new empty Excel sheet Javatpoint.xls in current directory.
Next TopicApache POI Workbook Sheet
|