Re: How to identify date cell type using XMLStreamReader (poi's XSSFReader api)

2017-04-11 Thread pengfeiji
I have a problem as follows public static Date getJavaDate(double date, boolean use1904windowing, TimeZone tz) { return getJavaDate(date, use1904windowing, tz, false); } How to confirm use1904windowing true or false. Thanks -- View this message in context: http://apache-poi.1045710

Re: How to identify date cell type using XMLStreamReader (poi's XSSFReader api)

2017-03-30 Thread kakadi
thanks a lot... I got it working now -- View this message in context: http://apache-poi.1045710.n5.nabble.com/How-to-identify-date-cell-type-using-XMLStreamReader-poi-s-XSSFReader-api-tp5727025p5727103.html Sent from the POI - User mailing list archive at Nabble.com. --

Re: How to identify date cell type using XMLStreamReader (poi's XSSFReader api)

2017-03-29 Thread Nick Burch
On Wed, 29 Mar 2017, kakadi wrote: Can you please give me an example on how to get formatIndex and formatString for my above example as isADateFormat(int formatIndex, java.lang.String formatString) expects both the parameters Take a look at XSSFSheetXMLHandler - that shows how to get the forma

Re: How to identify date cell type using XMLStreamReader (poi's XSSFReader api)

2017-03-29 Thread kakadi
Can you please give me an example on how to get formatIndex and formatString for my above example as isADateFormat(int formatIndex, java.lang.String formatString) expects both the parameters -- View this message in context: http://apache-poi.1045710.n5.nabble.com/How-to-identify-date-cell-type-

Re: How to identify date cell type using XMLStreamReader (poi's XSSFReader api)

2017-03-22 Thread Nick Burch
On Wed, 22 Mar 2017, kakadi wrote: Thanks for reply DateUtil.isCellDateFormatted(cell) method needs Cell instance as parameter, how do I create Cell instance, as I am using low level XMLStreamReader's event based api to parse sheet XML Try isADateFormat instead: https://poi.apache.org/apidocs/

Re: How to identify date cell type using XMLStreamReader (poi's XSSFReader api)

2017-03-22 Thread kakadi
Thanks for reply DateUtil.isCellDateFormatted(cell) method needs Cell instance as parameter, how do I create Cell instance, as I am using low level XMLStreamReader's event based api to parse sheet XML I am using XMLStreamReader as I need to process very large Excel and I am getting Out of memory

Re: How to identify date cell type using XMLStreamReader (poi's XSSFReader api)

2017-03-22 Thread Markus Kirsten
Hi, You can use 1) DateUtil.isCellDateFormatted(cell) to determine whether a cell is formatted as a date, and 2) DateUtil.getJavaDate(date) where date is a double (that you can get from the cell) Best regards, Markus > On 22 Mar 2017, at 07:44, kakadi wrote: > > I have a simple excel sheet(.