GerardDellemann commented on a change in pull request #234: MM-82 Detect Column 
Types
URL: https://github.com/apache/metamodel/pull/234#discussion_r355456780
 
 

 ##########
 File path: excel/src/main/java/org/apache/metamodel/excel/ExcelUtils.java
 ##########
 @@ -232,18 +230,93 @@ public static String getCellValue(Workbook wb, Cell 
cell) {
             throw new IllegalStateException("Unknown cell type: " + 
cell.getCellType());
         }
 
-        logger.debug("cell {} resolved to value: {}", cellCoordinate, result);
+        logger.debug("cell ({},{}) resolved to value: {}", cell.getRowIndex(), 
cell.getColumnIndex(), result);
 
         return result;
     }
 
+    private static Object getCellValueAsObject(final Workbook workbook, final 
Cell cell) {
+        if (cell == null) {
+            return null;
+        }
+
+        final Object result;
+
+        switch (cell.getCellType()) {
+        case BLANK:
+        case _NONE:
+            result = null;
+            break;
+        case BOOLEAN:
+            result = Boolean.valueOf(cell.getBooleanCellValue());
+            break;
+        case ERROR:
+            String errorResult;
 
 Review comment:
   Good one 👍 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to