private HSSFCellStyle createMatrixCellStyle(
      HSSFWorkbook workbook,
      HSSFCellStyle matrixHeaderTemplateCellStyle,
      boolean top,
      boolean right,
      boolean bottom,
      boolean left) {
    HSSFCellStyle cellStyle = POIUtils.copyCellStyle(workbook, matrixHeaderTemplateCellStyle);

    if (top) {
      cellStyle.setBorderTop(HSSFCellStyle.BORDER_THIN);
    }
    if (right) {
      cellStyle.setBorderRight(HSSFCellStyle.BORDER_THIN);
    }
    if (bottom) {
      cellStyle.setBorderBottom(HSSFCellStyle.BORDER_THIN);
    }
    if (left) {
      cellStyle.setBorderLeft(HSSFCellStyle.BORDER_THIN);
    }

    return cellStyle;
  }