値が条件に一致するかどうか。
<p>Excelの1900年1月1日を基準に、ミリ秒に直して判定する。
@param cell
@return
485141
@Override
    public boolean isMatch(final CommonCell cell) {
        if(!cell.isNumber()) {
            return false;
        }

        final long zeroTime = ExcelDateUtils.getExcelZeroDateTime(cell.isDateStart1904());
        final Date date = cell.getDateCellValue();
        final long value = date.getTime() - zeroTime;

        if(logger.isDebugEnabled()) {
            logger.debug("isMatch::date={}, zeroTime={}, diff={}",
                    ExcelDateUtils.formatDate(date), ExcelDateUtils.formatDate(new Date(zeroTime)), value);
        }

        return getOperator().isMatch(value);
    }
1144534
public static Object getCellValue(Cell cell, boolean isTrimCellValue) {
		if (null == cell) {
			return null;
		}
		return getCellValue(cell, cell.getCellTypeEnum(), isTrimCellValue);
	}
912944
public String getValueFromCell(int row, int column) {
        if (row < 1 || column < 1) {
            throw new IllegalArgumentException("Row and column must start from 1");
        }
        List<WebElement> elements = HtmlElementUtils.locateElements(getXPathBase() + "tr");
        List<WebElement> cells = elements.get(row - 1).findElements(By.xpath(".//td"));

        if (cells.size() > 0) {
            return cells.get(column - 1).getText();
        }

        return null;
    }
1100338
public String[] getRow(int i, SimpleDateFormat df)
    {
        if(sheetData == null)
            unmarshall();
        String[] ret = null;
        Row r = (Row)rows.get(i);
        List row = (List)r.getC();
        if(row != null)
        {
            ret = new String[numColumns];
            for(int j = 0; j < row.size(); j++)
            {
                Cell c = (Cell)row.get(j);

                int col = getColumn(c.getR())-1;
                if(col >= numColumns)
                    continue;

                STCellType type = c.getT();
                long style = c.getS();
                String value = c.getV();
                if(type.equals(STCellType.S))
                { 
                    ret[col] = workbook.getSharedString(Integer.parseInt(value));
                }
                else if(type.equals(STCellType.B))
                { 
                    ret[col] = value.equals("1") ? "TRUE" : "FALSE";
                }
                else if(type.equals(STCellType.N) && value != null && isDateTime(style))
                {
                    double d = Double.parseDouble(value);

                    // Convert excel date (based on 1/1/1900)
                    //   to java date (based on 1/1/1970)
                    // Ignore times, which are stored as fraction of a day
                    if(d > 1.0d) 
                        d -= 25569d; 

                    long dt = (long)(d*86400000d);
                    ret[col] = df.format(new Date(dt+1L)); // Add 1ms to allow for rounding errors
                }
                else
                {
                    ret[col] = value;
                } 
            }

            // Change any null strings to the empty string
            if(ret != null)
            {
                for(int j = 0; j < ret.length; j++)
                {
                    if(ret[j] == null)
                        ret[j] = "";
                }
            }
        }
        return ret;
    }
1124761
public static Cell getCell(final Sheet sheet, final CellPosition address) {
        ArgUtils.notNull(sheet, "sheet");
        ArgUtils.notNull(address, "address");
        return getCell(sheet, address.getColumn(), address.getRow());
    }
221908
public static int getColumns(final Sheet sheet) {
        ArgUtils.notNull(sheet, "sheet");

        int minRowIndex = sheet.getFirstRowNum();
        int maxRowIndex = sheet.getLastRowNum();
        int maxColumnsIndex = 0;
        for(int i = minRowIndex; i <= maxRowIndex; i++) {
            final Row row = sheet.getRow(i);
            if(row == null) {
                continue;
            }

            final int column = row.getLastCellNum();
            if(column > maxColumnsIndex) {
                maxColumnsIndex = column;
            }
        }

        return maxColumnsIndex;
    }
202541
private CellFormatResult getCellValue(final Cell cell, final Locale locale) {
        return getCellValue(new POICell(cell), locale);
    }
735859
public static Object getCellValue(int type, Cell cell) {
        switch (type) {
            case Cell.CELL_TYPE_BOOLEAN:
                return cell.getBooleanCellValue();
            case Cell.CELL_TYPE_NUMERIC:
                if (DateUtil.isCellDateFormatted(cell)) {
                    return DateUtil.getJavaDate(cell.getNumericCellValue());
                } else {
                    BigDecimal bd = new BigDecimal(cell.getNumericCellValue());
                    return bd.toString().contains(".") ? bd.setScale(2, RoundingMode.HALF_UP).toString() :
                            bd.toString();
                }
            case Cell.CELL_TYPE_STRING:
                try {
                    return DateUtils.parseDate(cell.getStringCellValue(), ReadExcelUtils.PATTERN);
                } catch (Exception e) {
                    return cell.getStringCellValue();
                }
            case Cell.CELL_TYPE_FORMULA:
                if (DateUtil.isCellDateFormatted(cell)) {
                    return cell.getDateCellValue();
                }
                break;
            default:
                break;
        }
        return null;
    }
93091
public static SpreadsheetVersion getVersion(final Sheet sheet) {
        ArgUtils.notNull(sheet, "sheet");

        if(sheet instanceof HSSFSheet) {
            return SpreadsheetVersion.EXCEL97;

        } else if(sheet instanceof XSSFSheet) {
            return SpreadsheetVersion.EXCEL2007;
        }

        return null;
    }
841089
public boolean mapsCell(String cell) {
        return mappers.values().stream().anyMatch(mapper -> mapper.mapsCell(cell));
    }
1120758
public static String getCellFormatPattern(final Cell cell, final CellFormatter cellFormatter) {
        if(cell == null) {
            return "";
        }

        String pattern = cellFormatter.getPattern(cell);
        if(pattern.equalsIgnoreCase("general")) {
            return "";
        }

        return pattern;

    }
44512
public String formatAsString(final Cell cell, final boolean isStartDate1904) {
        return formatAsString(cell, Locale.getDefault(), isStartDate1904);
    }
909771
private CellFormatResult getCellValue(final POICell poiCell, final Locale locale) {

        final short formatIndex = poiCell.getFormatIndex();
        final String formatPattern = poiCell.getFormatPattern();

        if(formatterResolver.canResolve(formatIndex)) {
            final CellFormatter cellFormatter = formatterResolver.getFormatter(formatIndex);
            return cellFormatter.format(poiCell, locale);

        } else if(formatterResolver.canResolve(formatPattern)) {
            final CellFormatter cellFormatter = formatterResolver.getFormatter(formatPattern);
            return cellFormatter.format(poiCell, locale);

        } else {
            // キャッシュに存在しない場合
            final CellFormatter cellFormatter = formatterResolver.createFormatter(formatPattern) ;
            if(isCache()) {
                formatterResolver.registerFormatter(formatPattern, cellFormatter);
            }
            return cellFormatter.format(poiCell, locale);

        }
    }
404873
static String retriveCellValue(Cell cell) {
        String cellValue = "";
        if (cell == null) {
            return cellValue;
        }
        try {
            switch (cell.getCellType()) {
                case Cell.CELL_TYPE_NUMERIC:
                    if (CellDateFormat.isDateCell(cell)) {
                        Date date = cell.getDateCellValue();
                        DateFormat dateFormat = CellDateFormat
                                .getFormat(cell.getCellStyle().getDataFormat()).getDateFormat();
                        cellValue = dateFormat.format(date);
                    } else {
                        cellValue = roundValue(cell.getNumericCellValue());
                    }
                    break;
                case Cell.CELL_TYPE_FORMULA:
                    cellValue = roundValue(cell.getSheet().getWorkbook().getCreationHelper()
                            .createFormulaEvaluator().evaluate(cell).formatAsString());
                    break;
                default:
                    cellValue = cell.getStringCellValue();
            }
        } catch (Exception e) {
            LOG.warn(MessageManager.getMessage("cell.fail"), cell.getRowIndex(),
                    cell.getColumnIndex(), e.getMessage());
        }

        return cellValue;
    }
360715
private CellFormatResult getErrorCellValue(final Cell cell, final Locale locale, final boolean isStartDate1904) {
        
        final CellFormatResult result = new CellFormatResult();
        result.setCellType(FormatCellType.Error);
        
        final ErrorCell errorCell = (ErrorCell) cell;
        final int errorCode = errorCell.getErrorCode();
        result.setValue(errorCode);
        
        if(isErrorCellAsEmpty()) {
            result.setText("");
            
        } else {
            /*
             * エラーコードについては、POIクラスを参照。
             * ・org.apache.poi.ss.usermodel.FormulaError
             * ・org.apache.poi.ss.usermodel.ErrorConstants
             */
            switch(errorCode) {
                case 7:
                    // 0除算
                    result.setText("#DIV/0!");
                    break;
                    
                case 42:
                    // 関数や数式に使用できる値がない
                    result.setText("#N/A");
                    break;
                    
                case 29:
                    // 数式が参照している名称がない
                    result.setText("#NAME?");
                    break;
                    
                case 0:
                    // 正しくない参照演算子または正しくないセル参照を使っている
                    result.setText("#NULL!");
                    break;
                    
                case 36:
                    // 数式または関数の数値が不適切
                    result.setText("#NUM!");
                    break;
                    
                case 23:
                    // 数式が参照しているセルがない
                    result.setText("#REF!");
                    break;
                    
                case 15:
                    // 文字列が正しいデータ型に変換されない
                    result.setText("#VALUE!");
                    break;
                    
                default:
                    result.setText("");
                    break;
            }
            
        }
        
        return result;
        
    }
287312
public final void setCellFactory(Callback<DateParameter, DateCell> factory) {
        requireNonNull(factory);
        cellFactoryProperty().set(factory);
    }
1276992
public Cell createCell(Date date) {

        Cell cell = this.getNextCell(CellType.STRING);
        if (date != null) {
            cell.setCellValue(date);
        }
        cell.setCellStyle(this.style.getDateCs());
        return cell;
    }