title: Copying a single HSSFCellStyle to many cells of HSSFWorkbook
body: <p>I want to create one HSSFCellSyle and copy it to the cells whose text satisfies some particular conditions.</p>
  
  <p>Currently,I am using a method to create new HSSFCellSyle everytime a cell satisfy conditions,though the styling parameters are the same.</p>
  
  <p>Also,this doesn't work(when limit exceeds) due to limitation on maximum count of HSSFCellStyles for a workbook. </p>
  
  <p>The method goes as:</p>
  
  <pre><code>private static void setCellColor(HSSFWorkbook workbook,HSSFCell cell1){
      HSSFCellStyle cellStyle = workbook.createCellStyle();
      cellStyle = workbook.createCellStyle();
      cellStyle.setFillForegroundColor(HSSFColor.RED.index);
      cellStyle.setBorderTop((short) 1);
      cell1.setCellStyle(cellStyle);
  }
  </code></pre>
  
  <p>Please suggest how to make only one object of HSSFCellStyle and then just copy it to other cells. </p>