incubator-odf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Ho <...@windowslive.com>
Subject RE: getDisplayText cannot return value of date field
Date Sun, 09 Jun 2013 10:06:16 GMT
Thanks for the reply!
Sorry, I forgot to mention, I tried 'getDateValue', but it throws 'NullPointerException'.
Thanks
> Date: Sun, 9 Jun 2013 17:35:56 +0800
> Subject: Re: getDisplayText cannot return value of date field
> From: ian@amham.net
> To: odf-users@incubator.apache.org
> 
> Hi Frank,
> 
> On Sun, Jun 9, 2013 at 4:21 PM, Frank Ho <hwl@windowslive.com> wrote:
> 
> > Hi,All
> >     I placed a date field in a cell, and choosed a date.
> >     In code, I got this cell via getCellByPosition(), then use
> > getDisplayText, but it returned an empty string.
> >     While if I placed a ListBox in this cell, then use getDisplayText, it
> > can return the value correctly.
> >     How can I get the value of date field in a cell?
> >
> 
> try getDateValue which will return a Calendar and then format as you want
> using normal Java date format classes.
> 
> I'm just guessing, but if your cell really is a date then the underlying
> TextExtractor used in GetDisplayText may not work?
> 
> 
> 
> >     Thanks!
> 
> 
> 
> -- 
> Cheers,
> 
> Ian C
 		 	   		  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message