Package br.net.woodstock.rockframework.document.spreadsheet

Examples of br.net.woodstock.rockframework.document.spreadsheet.Cell


      sheet.getRows().add(r);
    }
  }

  private void handleCell(final Row row, final org.apache.poi.ss.usermodel.Cell cell) {
    Cell c = new Cell();

    if (cell.getCellType() == org.apache.poi.ss.usermodel.Cell.CELL_TYPE_BLANK) {
      c.setValue(cell.getStringCellValue());
      c.setType(CellType.BLANK);
    } else if (cell.getCellType() == org.apache.poi.ss.usermodel.Cell.CELL_TYPE_BOOLEAN) {
      c.setValue(Boolean.valueOf(cell.getBooleanCellValue()));
      c.setType(CellType.BOOLEAN);
    } else if (cell.getCellType() == org.apache.poi.ss.usermodel.Cell.CELL_TYPE_ERROR) {
      c.setValue(Byte.valueOf(cell.getErrorCellValue()));
      c.setType(CellType.ERROR);
    } else if (cell.getCellType() == org.apache.poi.ss.usermodel.Cell.CELL_TYPE_FORMULA) {
      c.setValue(cell.getCellFormula());
      c.setType(CellType.FORMULA);
    } else if (cell.getCellType() == org.apache.poi.ss.usermodel.Cell.CELL_TYPE_NUMERIC) {
      c.setValue(Double.valueOf(cell.getNumericCellValue()));
      c.setType(CellType.NUMERIC);
    } else if (cell.getCellType() == org.apache.poi.ss.usermodel.Cell.CELL_TYPE_STRING) {
      c.setValue(cell.getStringCellValue());
      c.setType(CellType.TEXT);
    }

    row.getCells().add(c);
  }
View Full Code Here

TOP

Related Classes of br.net.woodstock.rockframework.document.spreadsheet.Cell

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.