You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by subhashmedhi <me...@gmail.com> on 2007/08/31 07:26:30 UTC
Format String
Hi,
I would like to know hoe to print out the format string of the cell of an
excel file.
Thanks,
subhash
--
View this message in context: http://www.nabble.com/Format-String-tf4358334.html#a12420871
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: Format String
Posted by subhash medhi <me...@gmail.com>.
On 8/31/07, subhash medhi <me...@gmail.com> wrote:
>
> But for HSSFCell getBoundWorkbook is not a defined method??
>
> subhash
>
>
> On 8/31/07, Nick Burch <ni...@torchbox.com> wrote:
> >
> > On Thu, 30 Aug 2007, subhashmedhi wrote:
> > > I would like to know hoe to print out the format string of the cell of
> >
> > > an excel file.
> >
> > Take a look at isCellDateFormatted in hssf.usermodel.HSSFDateFormat for
> > an
> > example . That includes the code for fetching the format string for a
> > given HSSFCell:
> >
> > HSSFCellStyle style = cell.getCellStyle();
> > int i = style.getDataFormat();
> > String f = style.getDataFormatString(cell.getBoundWorkbook
> > ());
> >
> > "f" ought to contain what you're after
> >
> > Nick
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> > For additional commands, e-mail: user-help@poi.apache.org
> >
> >
>
Re: Format String
Posted by subhash medhi <me...@gmail.com>.
But for HSSFCell getBoundWorkbook is not a defined function??
subhash
On 8/31/07, Nick Burch <ni...@torchbox.com> wrote:
>
> On Thu, 30 Aug 2007, subhashmedhi wrote:
> > I would like to know hoe to print out the format string of the cell of
> > an excel file.
>
> Take a look at isCellDateFormatted in hssf.usermodel.HSSFDateFormat for an
> example . That includes the code for fetching the format string for a
> given HSSFCell:
>
> HSSFCellStyle style = cell.getCellStyle();
> int i = style.getDataFormat();
> String f = style.getDataFormatString(cell.getBoundWorkbook());
>
> "f" ought to contain what you're after
>
> Nick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
>
Re: Format String
Posted by Nick Burch <ni...@torchbox.com>.
On Thu, 30 Aug 2007, subhashmedhi wrote:
> I would like to know hoe to print out the format string of the cell of
> an excel file.
Take a look at isCellDateFormatted in hssf.usermodel.HSSFDateFormat for an
example . That includes the code for fetching the format string for a
given HSSFCell:
HSSFCellStyle style = cell.getCellStyle();
int i = style.getDataFormat();
String f = style.getDataFormatString(cell.getBoundWorkbook());
"f" ought to contain what you're after
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: Format String
Posted by subhashmedhi <me...@gmail.com>.
Kindly help as it is very urgent.
subhashmedhi wrote:
>
> Hi,
> I would like to know hoe to print out the format string of the cell of
> an excel file.
>
> Thanks,
> subhash
>
--
View this message in context: http://www.nabble.com/Format-String-tf4358334.html#a12421161
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org