Date: | Mon, 20 Oct 2003 20:31:30 +0100 |
From: | Tony Bowden <kasei [...] tmtm.com> |
To: | Brad Van Orden <brad.vanorden [...] navius.com> |
CC: | bug-spreadsheet-parseexcel-simple [...] rt.cpan.org |
Subject: | Re: Expected value when reading in a numeric value |
On Mon, Oct 20, 2003 at 03:04:47PM -0400, Brad Van Orden wrote:
Show quoted text
Show quoted text
Show quoted text
> >>I'm trying to use your module, Spreadsheet::ParseExcel::Simple, to
> >>read in an excel spreadsheet on a linux computer and construct
> >>some arrays. It is reading the cells with words fine, but the
> >>cells with numbers are just coming out as "General." Is this the
> >>expected result, or am I doing something wrong?
> >Can you try it with just SpreadSheet::ParseExcel itself and see if it
> >works there. If it works with that and not with the ::Simple version,
> >then there's probably a bug in my code, but really I'm just providing a
> >thin wrapper around that...
> I rewrote using SpreadSheet::ParseExcel. I used the code given in the
> documentation. The word "General" is displayed instead of a number
> when using the "formatted" read. The number is displayed when using
> the "original" value.
>
> print "( $iR , $iC ) =>", $oWkC->Value, "\n" if($oWkC); # Formatted Value
> print "( $iR , $iC ) =>", $oWkC->{Val}, "\n" if($oWkC); # Original Value
>
> That is, the top line prints "General" instead of a number
> and the second line prints the number. I assume your code must be
> reading the formatted value.
Thanks for catching this.
I'll see if I can find a way around this for a later release.
Tony