ParseExcel returning funky numbers from cells with good numbers

28 views
Skip to first unread message

Autumn

unread,
Jul 8, 2011, 6:59:58 PM7/8/11
to Spreadsheet::ParseExcel
Hi All,

I am digesting a spreadsheet in Perl using ParseExcel but I am having
some difficult with a currency field.

The cell in question shows the following value in the spreadsheet:
$11.88. No formula, no notes, nothing fancy. Just plain old $11.88.

Here is the Perl code to get the value from this cell:

$cell = $worksheet->Cell( $row, $col );
$newPrice = $cell->Value;

When I look at "$newPrice" it's value is: $-46,063,524,249.60

Umm, what? Where is this number coming from? I have tried reformatting
this cell in all sorts of ways - General, Text, Number, etc. but I
always get the same result.

Where did my nice and pretty $11.88 go?

Thanks in advance,
Autumn

jmcnamara

unread,
Jul 14, 2011, 5:57:00 AM7/14/11
to Spreadsheet::ParseExcel

On Jul 8, 11:59 pm, Autumn <autumnor...@gmail.com> wrote:
> Hi All,
>
> I am digesting a spreadsheet in Perl using ParseExcel but I am having
> some difficult with a currency field.
>
> The cell in question shows the following value in the spreadsheet:
> $11.88. No formula, no notes, nothing fancy. Just plain old $11.88.

Hi,

The first thing you should do is upgrade to the latest version of the
Spreadsheet::ParseExcel module and see if you still have the problem.

If you still have the problem then can you let me know what is the
number formatting on the cell in question (something like $#,##0.00).

John.
--

Anupam Verma

unread,
Jul 26, 2011, 10:39:05 PM7/26/11
to spreadsheet...@googlegroups.com
Instead of $11.88 just put 11.88 in your excel sheet.

--
--
You received this message because you are subscribed to the Spreadsheet::ParseExcel Google Group.

For posting and other options visit this group at:
http://groups.google.com/group/spreadsheet-parseexcel?hl=en

You can also post by sending an email to:
http://groups.google.com/group/spreadsheet-parseexcel?hl=en

Reply all
Reply to author
Forward
0 new messages