in reply to csv 2 excel

hagmgoe:

The write() method tries to figure out what type of thing you're putting in the spreadsheet cell (number, formula, string, date, etc.), and one of your data fields is apparently confusing it. Just use the writestring() method to force it to be a string value rather than attempting to treat it as a formula. (There are other variations for other data types, too. Read perldoc Spreadsheet::WriteExcel for details.

...roboticus

Update: After re-reading the node, I notice that you're writing a row at a time, rather than a cell at a time. You may want to create your own function to write a row, and call that. Something like (untested):

sub write_row { my $worksheet = shift; my $row = shift; my $col = 0; while (my $cell = shift) { if ($cell =~ /"/) { $worksheet->writestring($row, $col++, $cell) + } else { $worksheet->write($row, $col++, $cell) } } }

Update 2: Fixed a couple typographical errors.

Replies are listed 'Best First'.
Re^2: csv 2 excel
by hagmgoe (Initiate) on Jul 04, 2010 at 09:30 UTC
    Thanks for your help, I found the Problem. The real mistake another row content some contents same data who is not compatibel wtih the script.