Since I am working at XSSF + SAX level, I am able to get the format of that
particular cell by accessing the Styles table using the following code.

XSSFCellStyle style = styles.getStyleAt(styleIndex);
String formatString = style.getDataFormatString();
System.out.println(formatString);

This gave me 'm/d/yy' for both values, which comes under BuiltinFormats.
But I strongly believe there should be some way excel differentiate both
these value. Do you think that i need to include something else to get the
correct format of 'MM/dd/yyyy' for one and number for the other.

Thanks in advance.


On Fri, Apr 25, 2014 at 12:31 PM, Renjith R <ranju...@gmail.com> wrote:

> Hi,
>
> I am using Apache POI to read 
> Excel<http://www.aspose.com/categories/java-components/aspose.cells-for-java/default.aspx>
>  file(.xlsx)
> and validate its contents.
> We are having a date field in excel whcih should be in format MM/dd/yyyy.
>
> Suppose if the date fild has two values as follows,
>
> 1) 04/24/2014
> 2) 04242014
>
> I have to accept the first one and reject the second.
> Since excel stores both these values in integer format, I am not able to
> differentiate them.
> Please suggest if you have any idea about how to solve this.
>
> --
> *RENJITH R*
> 9446011990
>



-- 
*RENJITH R*
9446011990

Reply via email to