|
The cellValue() method, when used with a numeric cell, returns the value in a standard, computable format. The display format is ignored. So, if the type of the cell is "date", the value is returned as an ISO-8601 compliant string. It's a design choice of the API, allowing the applications to get consistently formatted numeric values that doesn't depend of the external layout or the cells.
However, there is a simple way to get the display content of a cell (as it was recorded by OpenOffice.org). To do so, one cas select the "paragraph" element of the cell, then get the content of this paragraph. Example:
my $p = $doc->getCellParagraph($sheet, $col, $row);
my $text = $doc->getText($p);
Beware: the applications should avoid updating a cell paragraph by setText(), knowing that they could produce inconsistencies between the cell display value and the cell computable value.
|