@SuppressWarnings("deprecation")
private HSSFWorkbook createWorkbook() {
HSSFWorkbook wb = new HSSFWorkbook();
HSSFFont font = wb.createFont();
font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
HSSFSheet worksheet = wb.createSheet("Customers");
worksheet.setColumnWidth(0, (20 * 256));
worksheet.setColumnWidth(1, (30 * 256));
worksheet.setColumnWidth(4, (20 * 256));
HSSFRow row = worksheet.createRow(0);
HSSFRichTextString value = new HSSFRichTextString("Customers");
value.applyFont(font);
row.createCell(0).setCellValue(value);
row = worksheet.createRow(1);
row.createCell(0).setCellValue(new HSSFRichTextString("Customer Account Details"));
worksheet.createRow(2);
row = worksheet.createRow(3);
HSSFCellStyle style = wb.createCellStyle();
style.setBorderBottom(HSSFCellStyle.BORDER_THIN);
font = wb.createFont();
font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
value = new HSSFRichTextString("Name");
value.applyFont(font);
HSSFCell cell = row.createCell(0);
cell.setCellValue(value);