From: Peter J. Holzer on
On 2010-08-03 23:47, mike yue <needpassion(a)gmail.com> wrote:
> I am not sure if this is related to the perl script(uses WriteExcel
> module), or related to my MS office excel settings.
>
> e.g. Here are six cells showing in a spreadsheet:
>
> 10b1e4 146914
> 10b818 14db80
> 8.054E+33 808c940
>
> The "8.054E+33" is actually from a string "8054e30" representing a
> memory address, which is definitely not 8.054E+33.

% perl -le 'print 8054e30'
8.054e+33


> But all other cells are show correct - that is weird.
>
> My perl script uses WriteExcel, and the cells are with format which
> only set_align('right').

Which method do you use to write the cell? "write" or "write_string"?

If you use write, it needs to guess whether the thing you want to write
is a string or a number (a perl scalar can be both), and since 8054e30
looks like a number it guesses that it is one. Use write_string if you
want to write a string. If you are already using write_string, it's
probably a bug.

hp