/** * セルの値を取得する * * @param row 行データ * @param nColumn 列番号 * @return セルの値 */ public static Object getData(XSSFRow row, int nColumn) { if (row != null) { XSSFCell cell = row.getCell(nColumn); if (cell != null) { if (XSSFCell.CELL_TYPE_NUMERIC == cell.getCellType()) { return cell.getNumericCellValue(); } else if (XSSFCell.CELL_TYPE_STRING == cell.getCellType()) { return cell.getStringCellValue(); } } } return null; }