diff options
author | Nick Burch <nick@apache.org> | 2008-04-05 18:01:05 +0000 |
---|---|---|
committer | Nick Burch <nick@apache.org> | 2008-04-05 18:01:05 +0000 |
commit | 96d3004ed71dc050333ad7320c35d8bc524227c0 (patch) | |
tree | b1ec8e96c6ae62d7560a3f9d0593e26cf987d1bc /src/java/org/apache/poi/ss | |
parent | ec1b495a0a4e9647c2faad0533f6b97b985c640d (diff) | |
download | poi-96d3004ed71dc050333ad7320c35d8bc524227c0.tar.gz poi-96d3004ed71dc050333ad7320c35d8bc524227c0.zip |
Tweak DateUtil, an add cell content fetching to the quick guide documentation
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@645150 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/poi/ss')
-rw-r--r-- | src/java/org/apache/poi/ss/usermodel/DateUtil.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/java/org/apache/poi/ss/usermodel/DateUtil.java b/src/java/org/apache/poi/ss/usermodel/DateUtil.java index ad3ba25d83..9335de35da 100644 --- a/src/java/org/apache/poi/ss/usermodel/DateUtil.java +++ b/src/java/org/apache/poi/ss/usermodel/DateUtil.java @@ -280,6 +280,8 @@ public class DateUtil double d = cell.getNumericCellValue(); if ( DateUtil.isValidExcelDate(d) ) { CellStyle style = cell.getCellStyle(); + if(style == null) return false; + int i = style.getDataFormat(); String f = style.getDataFormatString(); bDate = isADateFormat(i, f); |