in reply to string incorrectly displyed in exponential form in MSExcel


The write() method in Spreadsheet::WriteExcel is a wrapper function for several other more specific write_*() methods.

What is happening here is that it is writing data that looks like a number as a number. See the relevant section of the docs where this is explained.

The solution (as pointed out by andreas1234567 above) is to explicitly write strings using write_string().

For a more advanced approach, you could also modify the behaviour of write() via the add_write_handler() method. There are several examples of this in the distro.

--
John.

  • Comment on Re: string incorrectly displyed in exponential form in MSExcel