Esempio n. 1
0
  /**
   * Use this to create new cells within the row and return it.
   *
   * <p>The cell that is returned is a CELL_TYPE_BLANK. The type can be changed either through
   * calling setCellValue or setCellType.
   *
   * @param column - the column number this cell represents
   * @return HSSFCell a high level representation of the created cell.
   */
  public HSSFCell createCell(short column, int type) {
    HSSFCell cell = new HSSFCell(book, sheet, getRowNum(), column, type);

    addCell(cell);
    sheet.addValueRecord(getRowNum(), cell.getCellValueRecord());
    return cell;
  }
Esempio n. 2
0
  /**
   * create a high level HSSFCell object from an existing low level record. Should only be called
   * from HSSFSheet or HSSFRow itself.
   *
   * @param cell low level cell to create the high level representation from
   * @return HSSFCell representing the low level record passed in
   */
  protected HSSFCell createCellFromRecord(CellValueRecordInterface cell) {
    HSSFCell hcell = new HSSFCell(book, sheet, getRowNum(), cell);

    addCell(hcell);

    // sheet.addValueRecord(getRowNum(),cell.getCellValueRecord());
    return hcell;
  }