in reply to Re^2: Avoiding Strange Win32::ODBC Return Values for Integers
in thread Avoiding Strange Win32::ODBC Return Values for Integers (NUL)

do you know which col# is supposed to be a number?
i was thinking that you try something like this first:
if ( $col == 42 ) { $worksheet->write_number($row, $col++, $_); } else { $worksheet->write($row, $col++, $_, $format); }
and once you're sure 57 is coming back from your query into the sheet, then you can start playing around with $format and your regex

Replies are listed 'Best First'.
Re^4: Avoiding Strange Win32::ODBC Return Values for Integers
by jonix (Friar) on Oct 28, 2005 at 17:39 UTC
    I have the 57 now, using chop - see my update to the original post.

    > do you know which col# is supposed to be a number?
    No - the SQL queries that I will run with this script may vary. I want it to become quite generic :)

    As I have found the strange last character beeing guilty for spoiling automatic datatype detection by the module, elegantly getting rid of it will be my new goal.