Ejemplo n.º 1
0
  public void setCell(int index, double value) {
    HSSFCell cell = this.row.createCell((short) index);
    cell.setCellType(HSSFCell.CELL_TYPE_NUMERIC);
    cell.setCellValue(value);
    // HSSFCellStyle cellStyle = workbook.createCellStyle();
    // HSSFDataFormat format = workbook.createDataFormat();
    // setBorder(cellStyle);
    _sims[(int) Math.floor(value * 10)]++;
    HSSFCellStyle cellStyle = normalPStyle;
    if (_backColor > -1) {
      if (_backColor == HSSFColor.RED.index) cellStyle = redPStyle;
      else if (_backColor == HSSFColor.YELLOW.index) cellStyle = yellowPStyle;
    }
    // cellStyle.setDataFormat(format.getFormat(NUMBER_FORMAT));

    cell.setCellStyle(cellStyle);
  }