title: How can I make particular cell as border form in excel using java
body: <p>May i know How can I make  particular cell as border form in excel using java ?
  i need only particular cell with table foramat.
  Ref: i have enclosed screen shot for more details.</p>
  
  <p><img src="https://i.stack.imgur.com/brOyw.jpg" alt="enter image description here"></p>
  
  <p><strong>My Code:</strong>  </p>
  
  <pre><code> try {
          int rowCount = 1;
  
          FileOutputStream fileOut = new FileOutputStream("poi-test.xls");
  
          HSSFWorkbook workbook = new HSSFWorkbook();
          HSSFSheet sheet = workbook.createSheet();
          HSSFRow row = null;
          HSSFCell cell = null;
          HSSFFont heading_caption_font = null;
          HSSFCellStyle heading_caption_style = null;
  
          workbook.setSheetName(0,
                                "Ageing Report",
                                HSSFWorkbook.ENCODING_COMPRESSED_UNICODE);
  
          heading_caption_font = workbook.createFont();
          heading_caption_font.setFontHeightInPoints((short)12);
          heading_caption_font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
          heading_caption_font.setFontName("Calibri");
  
          heading_caption_style = workbook.createCellStyle();
          heading_caption_style.setFont(heading_caption_font);
  
          row = sheet.createRow(rowCount);
          rowCount += 1;
  
          cell = row.createCell((short)3);
  
          cell.setCellValue("Aging Report on UN-acted (DETAILED)");
          cell.setCellStyle(heading_caption_style);
          sheet.addMergedRegion(new Region(1, (short)3, 1, (short)4));
  
          workbook.write(fileOut);
          fileOut.flush();
          fileOut.close();
  
      } catch (FileNotFoundException e) {
          e.printStackTrace();
      } catch (IOException e) {
          e.printStackTrace();
      }
  </code></pre>
  
  <p>i can't able to get reqeried output:</p>