In this program we are going to set alignment of cells
on an excel sheet.
The packages we need to import are java.io.*,java.util.* ,org.apache.poi.hssf.usermodel.HSSFSheet,org.apache.poi.
hssf. usermodel. HSSFCellStyle, org.apache.poi.usermodel.HSSFRow, org.apache.poi.usermodel.HSSFCell
,and org.apache.poi.hssf.usermodel. HSSFWorkbook.
setAlignment(HSSFCellStyle.ALIGN_CENTER): This method is used to set the alignment of cell. We first create cell style and
then set the alignment to the cell. In this example we are creating cell with
center alignment. But you can use other alignments.