Hi Dinesh,

On Fri, Jul 15, 2005 at 17:45:41 +0530, Dinesh Varadharajan wrote:

> <table:table-cell table:style-name="ce2" table:formula="oooc:=TODAY()" 
> office:value-type="date" 
> office:date-value="2005-07-15"><text:p>07/15/05</text:p></table:table-cell>
> 
> But If I use numberformat to fetch the type its coming as double. the 
> value is also coming as double instead of date.

This is because there isn't an explicit number format set at the cell.
If no number format is set, the display type of the result of a formula
cell is determined from the formula calculation. Certain functions have
implicit display formats, like TODAY() or NOW(), or calculations with
date values (date - number => date, date - date => number), or
calculations involving cells with currency formats (currency + currency
=> currency).

> I also tried FormulaResultType but of no use.

FormulaResultType currently only distinguishes between numerical results
and string results, a date is represented by a serial number, therefore
the FormulaResultType is VALUE.

> How could I identify the datatype in the case of functions.

The only possibility I see would be to obtain the display string and
check if that meets numerical or date criteria somehow. I admit this is
a shortcoming of the current API, please file an issue of type
enhancement against the spreadsheet project.

Thanks
  Eike

-- 
 OOo/SO Calc core developer. Number formatter bedevilled I18N transpositionizer.
 GnuPG key 0x293C05FD:  997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to