Examples of createCell()


Examples of org.apache.poi.ss.usermodel.Row.createCell()

          Cell cn = r.createCell(0, Cell.CELL_TYPE_NUMERIC);
          cn.setCellValue(1.2);
          Cell cs = r.createCell(1, Cell.CELL_TYPE_STRING);
          cs.setCellValue("Testing");
         
          Cell cfn = r.createCell(2, Cell.CELL_TYPE_FORMULA);
          cfn.setCellFormula("A1")
          Cell cfs = r.createCell(3, Cell.CELL_TYPE_FORMULA);
          cfs.setCellFormula("B1");
         
          FormulaEvaluator fe = wb.getCreationHelper().createFormulaEvaluator();
View Full Code Here

Examples of org.apache.poi.ss.usermodel.Row.createCell()

          Cell cs = r.createCell(1, Cell.CELL_TYPE_STRING);
          cs.setCellValue("Testing");
         
          Cell cfn = r.createCell(2, Cell.CELL_TYPE_FORMULA);
          cfn.setCellFormula("A1")
          Cell cfs = r.createCell(3, Cell.CELL_TYPE_FORMULA);
          cfs.setCellFormula("B1");
         
          FormulaEvaluator fe = wb.getCreationHelper().createFormulaEvaluator();
          assertEquals(Cell.CELL_TYPE_NUMERIC, fe.evaluate(cfn).getCellType());
          assertEquals(Cell.CELL_TYPE_STRING, fe.evaluate(cfs).getCellType());
View Full Code Here

Examples of org.apache.poi.ss.usermodel.Row.createCell()

         
          // Populate
          for(int rn=0; rn<= topRow; rn++) {
             Row r = s.createRow(rn);
             for(int cn=0; cn<leftmostColumn; cn++) {
                Cell c = r.createCell(cn, Cell.CELL_TYPE_NUMERIC);
                c.setCellValue(100*rn + cn);
             }
          }
         
          // Create the Freeze Pane
View Full Code Here

Examples of org.apache.poi.ss.usermodel.Row.createCell()

          row = sheet.createRow(rowIndex++);
          columnIndex = 0;

          for (HtmlColumn column : htmlRow.getColumns(ReservedFormat.ALL, ReservedFormat.XLS)) {
            cell = row.createCell(columnIndex++);
            cell.setCellValue(column.getContent().toString());
          }
        }
      }
View Full Code Here

Examples of org.apache.poi.ss.usermodel.Row.createCell()

        row = sheet.createRow(rowIndex++);
        columnIndex = 0;

        for (HtmlColumn column : htmlRow.getColumns(ReservedFormat.ALL, ReservedFormat.XLS)) {
          cell = row.createCell(columnIndex++);
          cell.setCellValue(column.getContent().toString());
        }
      }

      // Column auto-sizing
View Full Code Here

Examples of org.apache.poi.ss.usermodel.Row.createCell()

          row = sheet.createRow(rowIndex++);
          columnIndex = 0;

          for (HtmlColumn column : htmlRow.getColumns(ReservedFormat.ALL, ReservedFormat.XLSX)) {
            cell = row.createCell(columnIndex++);
            cell.setCellValue(column.getContent().toString());
          }
        }
      }
View Full Code Here

Examples of org.apache.poi.ss.usermodel.Row.createCell()

        row = sheet.createRow(rowIndex++);
        columnIndex = 0;

        for (HtmlColumn column : htmlRow.getColumns(ReservedFormat.ALL, ReservedFormat.XLSX)) {
          cell = row.createCell(columnIndex++);
          cell.setCellValue(column.getContent().toString());
        }
      }

      // Column auto-sizing
View Full Code Here

Examples of org.apache.poi.ss.usermodel.Row.createCell()

            }
            Cell title = titleRow.createCell(index);
            title.setCellStyle(info.titleStyle);
            title.setCellValue(property.getName().identifier);

            Cell value = valueRow.createCell(index);
            value.setCellStyle(info.dataStyle);
            if (property.getType() instanceof BasicType) {
                BasicType type = (BasicType) property.getType();
                switch (type.getKind()) {
                case DATE:
View Full Code Here

Examples of org.apache.poi.ss.usermodel.Row.createCell()

     
      int lastColumn = sheet.getRow(0).getPhysicalNumberOfCells();     
      for (int cn=0; cn<lastColumn; cn++) {
        Cell cell = row.getCell(cn, Row.RETURN_BLANK_AS_NULL);
        if (cell == null) {
          cell = row.createCell(cn);
          cell.setCellType(Cell.CELL_TYPE_STRING);
          cell.setCellValue(argument[cn]);
        }
      }
     
View Full Code Here

Examples of org.apache.poi.ss.usermodel.Row.createCell()

    final Column[] columns = getColumns();
    for (int i = 0; i < columns.length; i++) {
      Object value = values[i];
      if (value != null) {
        int columnNumber = columns[i].getColumnNumber();
        Cell cell = row.createCell(columnNumber);

        // use a lazyref and the isFetched method to only create style
        // if nescesary
        LazyRef<CellStyle> cellStyle = new LazyRef<CellStyle>() {
          @Override
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.