Package org.zkoss.poi.ss.usermodel

Examples of org.zkoss.poi.ss.usermodel.Cell


    if (lCol < 0 || rCol < 0) { //no cells in this row
      return null;
    }
      final Map<Integer, Cell> cells = new HashMap<Integer, Cell>();
      for(int c = lCol; c <= rCol; ++c) {
        final Cell cell = row.getCell(c);
        if (cell != null) {
          cells.put(Integer.valueOf(c), cell);
        }
      }
      return cells;
View Full Code Here


        String[] xlist = new String[rows*cols];
        for (int r = 0, j=0; r < rows; ++r) {
          int rowIndex = r + top;
          for (int c = 0; c < cols; ++c) {
            int colIndex = c + left;
            final Cell cell = BookHelper.getCell(worksheet, rowIndex, colIndex);
            xlist[j++] = BookHelper.getCellText(cell);
          }
        }
        return xlist;
      }
View Full Code Here

 
  private class HyperlinkStringSetter extends ValueSetter {
   
    protected Set<Ref>[] setCellValue(int row, int col, RefSheet refSheet, Object value) {
      final HyperlinkContext context = (HyperlinkContext)value;
      final Cell cell = BookHelper.getOrCreateCell(_sheet, row, col);
      final Set<Ref>[] refs = BookHelper.setCellValue(cell, context.getDisplay());
      BookHelper.setCellHyperlink(cell, context.getLinktype(), context.getAddress());
      return refs;
    }
View Full Code Here

      return setCellValue(row, col, refSheet, ((Number)value).doubleValue());
    }
   
    private Set<Ref>[] setCellValue(int rowIndex, int colIndex, RefSheet refSheet, double value) {
      //locate the cell of the refSheet
      final Cell cell = getOrCreateCell(rowIndex, colIndex, refSheet, Cell.CELL_TYPE_NUMERIC);
      return BookHelper.setCellValue(cell, value);
    }
View Full Code Here

      return setCellValue(row, col, refSheet, ((Boolean)value).booleanValue());
    }
   
    private Set<Ref>[] setCellValue(int rowIndex, int colIndex, RefSheet refSheet, boolean value) {
      //locate the cell of the refSheet
      final Cell cell = getOrCreateCell(rowIndex, colIndex, refSheet, Cell.CELL_TYPE_BOOLEAN);
      return BookHelper.setCellValue(cell, value);
    }
View Full Code Here

      return setCellValue(row, col, refSheet, ((Byte)value).byteValue());
    }
   
    private Set<Ref>[] setCellValue(int rowIndex, int colIndex, RefSheet refSheet, byte value) {
      //locate the cell of the refSheet
      final Cell cell = getOrCreateCell(rowIndex, colIndex, refSheet, Cell.CELL_TYPE_ERROR);
      return BookHelper.setCellErrorValue(cell, value);
    }
View Full Code Here

      return setCellValue(row, col, refSheet, (Date) value);
    }
   
    private Set<Ref>[] setCellValue(int rowIndex, int colIndex, RefSheet refSheet, Date value) {
      //locate the cell of the refSheet
      final Cell cell = getOrCreateCell(rowIndex, colIndex, refSheet, Cell.CELL_TYPE_NUMERIC);
      return BookHelper.setCellValue(cell, value);
    }
View Full Code Here

      return setCellFormula(row, col, refSheet, (String) value);
    }
   
    private Set<Ref>[] setCellFormula(int rowIndex, int colIndex, RefSheet refSheet, String value) {
      //locate the cell of the refSheet. bug#296: cannot insert =A1 into cell via API
      final Cell cell = getOrCreateCell(rowIndex, colIndex, refSheet, Cell.CELL_TYPE_BLANK);
      final Set<Ref>[] refs = BookHelper.setCellFormula(cell, value);
      if (refs != null && (refs[0] == null || refs[0].isEmpty())) {
        refs[0].add(refSheet.getOrCreateRef(rowIndex, colIndex, rowIndex, colIndex));
      }
      return refs;
View Full Code Here

      return setCellValue(row, col, refSheet, (String) value);
    }
   
    private Set<Ref>[] setCellValue(int rowIndex, int colIndex, RefSheet refSheet, String value) {
      //locate the cell of the refSheet
      final Cell cell = getOrCreateCell(rowIndex, colIndex, refSheet, Cell.CELL_TYPE_STRING);
      return BookHelper.setCellValue(cell, value);
    }
View Full Code Here

      return setCellValue(row, col, refSheet, (RichTextString) value);
    }
   
    private Set<Ref>[] setCellValue(int rowIndex, int colIndex, RefSheet refSheet, RichTextString value) {
      //locate the model book and sheet of the refSheet
      final Cell cell = getOrCreateCell(rowIndex, colIndex, refSheet, Cell.CELL_TYPE_STRING);
      return BookHelper.setCellValue(cell, value);
    }
View Full Code Here

TOP

Related Classes of org.zkoss.poi.ss.usermodel.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.