public synchronized void addHeader() {

    if (headerExists) return;

    Row row = workBook.addRow(curRowIdx);
    int idx = 0;

    for (String keywords : Constants.SHEET_COLS_SET) {
      workBook.addValueToRow(row, idx, WorkBookValueType.STRING, keywords);
      idx++;
    }
    headerExists = true;
    curRowIdx++;

    save();
  }
  public int update(BusinessEntity businessEntity) {

    int rowIdx;

    String name = businessEntity.getName();
    Set<String> phoneSet = businessEntity.getPhone();
    Set<String> webSiteSet = businessEntity.getWebsites();

    String phoneSetStr = stringify(phoneSet);
    String websiteSetStr = stringify(webSiteSet);

    Email email = businessEntity.getEmail();
    byte[] imgData = email.getData();

    Row row;
    rowIdx = businessEntity.getWorkBookRowIdx();

    row = (rowIdx > -1) ? workBook.getSheet().getRow(rowIdx) : workBook.addRow(curRowIdx);

    workBook.addValueToRow(row, 0, WorkBookValueType.STRING, name);
    workBook.addValueToRow(row, 1, WorkBookValueType.STRING, phoneSetStr);
    workBook.addValueToRow(row, 2, WorkBookValueType.STRING, websiteSetStr);

    if (imgData != null) workBook.addImage(3, curRowIdx, imgData);

    rowIdx = curRowIdx;
    businessEntity.setWorkBookRowIdx(rowIdx);

    curRowIdx++;

    save();
    return rowIdx;
  }
 public void save() {
   workBook.save();
 }